Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with $subscription->cancel #14

Open
beautifullife opened this issue Nov 22, 2019 · 2 comments
Open

Issue with $subscription->cancel #14

beautifullife opened this issue Nov 22, 2019 · 2 comments

Comments

@beautifullife
Copy link

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
Copy link

Same here. Have you found any workaround?

@raimon-segura
Copy link
Contributor

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 => #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants