I've just updated Laravel cashier package from 5 version to the latest 6 version. It supports multiple subscriptions and it's really cool. But I've got one problem with renewing subscription after subscription cancellation.
I'm removing subscription manually from stripe dashboard and customer.subscription.deleted
event is firing.
Cashier method is catching this event:
\Laravel\Cashier\Http\Controllers\WebhookController@handleWebhook
And $subscription->markAsCancelled();
is firing.
From that moment subscription cannot be renewed. I've tried to use resume()
function, but subscription can be resumed only(!) on grace period.
In previous version of cashier I was using swap()
method to resume subscription. Now it returns:
Stripe\Error\InvalidRequest: Customer cus_*** does not have a subscription with ID sub_***** in /**/vendor/stripe/stripe-php/lib/ApiRequestor.php:103 from API request 'req_****'
Creating new customer and subscription is not very efficient way. What your thoughts about this issue?