Sell access to the platform, spaces, groups, events, hidden messages, or physical products.
In development mode, the subscription start date is the one of the customer "Current simulation time" (instead of the date of creation of the subscription). This can be changed by editing the customer: https://dashboard.stripe.com/test/customers -> Select the customer -> "Advance time".
Advancing time allows simulating time advancing very quickly to test events such as arriving to the expiration date.
Sandbox accounts:
Implement \humhub\modules\ecommerce\models\interfaces\PurchasableInterface
to the ActiveRecord class you want to sell.
Add an event in the module config.php
file:
[
'class' => \yii\base\Model::class,
'event' => 'ecommerce.productTypes.getAvailableTypes',
'callback' => [Events::class, 'onEcommerceProductTypesGetAvailableTypes'],
],
onEcommerceProductTypesGetAvailableTypes
method in the Events
class (replace ProductToSellClass
by your class implementing PurchasableInterface
): public static function onEcommerceProductTypesGetAvailableTypes(\humhub\components\Event $event): void
{
$event->result[] = ManagedEvent::getEcommerceProductType();
}