Closed jamesblackwell closed 2 months ago
Hey there,
Unfortunately we don't support this version of the library anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.
Thanks!
Cashier Stripe Version
14.8
Laravel Version
10
PHP Version
8.2
Database Driver & Version
No response
Description
This appears to be triggered by the user submitting cancellation feedback via the Stripe checkout portal
That triggers a subscription updated event
Then the Cashier webhook seems to set the ends_at to null
I guess this maybe a possible race condition
// Cancellation date... if ($data['cancel_at_period_end'] ?? false) { $subscription->ends_at = $subscription->onTrial() ? $subscription->trial_ends_at : Carbon::createFromTimestamp($data['current_period_end']); } elseif (isset($data['cancel_at']) || isset($data['canceled_at'])) { $subscription->ends_at = Carbon::createFromTimestamp($data['cancel_at'] ?? $data['canceled_at']); } else { $subscription->ends_at = null; }
Steps To Reproduce
Create subscription Cancel Set cancellation reason quickly Notice subscription ends_at is null