Created
August 13, 2020 11:33
-
-
Save MrMooky/d98c6d3781c0a24292fe59fea2bcf58d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$update = \Stripe\Subscription::update($subscriptionId, [ | |
'billing_cycle_anchor' => 'now', | |
'proration_behavior' => 'always_invoice', | |
'proration_date' => strtotime('tomorrow 00:01'), | |
'default_tax_rates' => [$this->getCorrectTaxRateId($planID)], | |
'cancel_at_period_end' => false, | |
'items' => [ | |
[ | |
'id' => $subscription->items->data[0]->id, | |
'plan' => $planID | |
], | |
], | |
'coupon' => $coupon | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment