laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 667 forks source link

Payment behavior isn't being passed on like proration behavior is when updating the quantity from the subscription #1646

Closed skeemer closed 6 months ago

skeemer commented 6 months ago

Cashier Stripe Version

14.13

Laravel Version

10.26

PHP Version

8.1

Database Driver & Version

No response

Description

When calling $someSubscription->errorIfPaymentFails()->updateQuantity(...), if the item is in the database, it passes the call to the SubscriptionItem without passing on the payment behavior specified.

It looks like Concerns\InteractsWithPaymentBehavior is missing setBehavior() if you match the way Concerns\Prorates works.

Steps To Reproduce

  1. Create a subscription normally and make sure the new Subscription and SubscriptionItem exist.
  2. Delete the payment method within the Stripe interface.
  3. $someSubscription->errorIfPaymentFails()->updateQuantity(...) This will create an unpaid invoice rather than erroring.
driesvints commented 6 months ago

Hey there,

Unfortunately we don't support this version 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!