laravel / cashier-mollie

MIT License
375 stars 63 forks source link

Error in swapNextCycle(): Carbon required, null given #243

Open zqstack opened 4 years ago

zqstack commented 4 years ago

When calling swapNextCycle() the same way as swap(), it is returning an error. Whereas swap() is working.

Argument 1 passed to Laravel\Cashier\Subscription::scheduleNewOrderItemAt() must be an instance of Carbon\Carbon, null given, called in /vendor/laravel/cashier-mollie/src/Subscription.php on line 246

What should I do?

lexdewilligen commented 4 years ago

If I'm correct, $cycle_ends_at can only be null if the subscription has been cancelled. Could that be your case? Maybe if you resume the subscription in the proper way (https://github.com/laravel/cashier-mollie#resuming-subscriptions), your issue should be resolved.