yii2-cashier icon indicating copy to clipboard operation
yii2-cashier copied to clipboard

Issue with $subscription->cancel

Open beautifullife opened this issue 5 years ago • 2 comments

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.

beautifullife avatar Nov 22 '19 18:11 beautifullife

Same here. Have you found any workaround?

dositejg avatar Nov 26 '19 15:11 dositejg

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

raimon-segura avatar Dec 16 '19 18:12 raimon-segura