yii2mod / yii2-cashier

Yii2 Cashier provides an interface to Stripe's subscription billing services.
MIT License
46 stars 25 forks source link

Issue with $subscription->cancel #14

Open beautifullife opened 5 years ago

beautifullife commented 5 years ago

Hi author, thanks for this cool contribution to work with Stripe. It's work for me! But I have a little issue in file yii2mod/yii2-cashier/models/SubscriptionModel.php line 328 in function cancel():

$subscription->cancel(['at_period_end' => true]);

I get an error that "at_period_end is not a valid param". I just change to $subscription->cancel(); And it work.

dositejg commented 5 years ago

Same here. Have you found any workaround?

raimon-segura commented 4 years ago

A workaround could be: // $subscription->cancel(['at_period_end' => true]); $subscription->cancel_at_period_end = true; $subscription->save();

Hopefully, this will be fixed in a new version => https://github.com/yii2mod/yii2-cashier/pull/15