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

Upgrade Stripe library/API version to current #1800

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Upgrade Stripe library/API version to current #1800

merged 5 commits into from
Oct 10, 2024

Conversation

dracos
Copy link
Member

@dracos dracos commented Jun 11, 2024

Similar (hopefully identical?) to mysociety/mapit.mysociety.org#158
so we can get on current Stripe API version, and improve downgrade behaviour.

Copy link
Member

@struan struan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one tiny question but assuming that's fine it looks good.

classes/Subscription.php Show resolved Hide resolved
@dracos dracos force-pushed the stripe-upgrade branch 4 times, most recently from bd82074 to 6e894f0 Compare June 21, 2024 14:05
@dracos dracos force-pushed the master branch 3 times, most recently from 2c2b1cc to ccc444c Compare July 5, 2024 08:11
@ajparsons
Copy link
Contributor

https://github.com/mysociety/theyworkforyou/tree/stripe-upgrade-format < should be this but via the new formatting.

@dracos
Copy link
Member Author

dracos commented Oct 10, 2024

Thanks, my ignorance on previous comment!

@dracos
Copy link
Member Author

dracos commented Oct 10, 2024

-$subscription->stripe->cancel(['at_period_end' => true]);
+\Stripe\Subscription::update($subscription->stripe->id, ['cancel_at_period_end' => false]);

true somehow became false here (in my original changes)

2018-08-23 - delete() only for instant deletion now
2018-11-08 - invoice status, rather than forgiven boolean
2019-10-17 - account_balance renamed to balance
2020-08-27 - supply tax rate ID rather than tax_percent
2023-08-16 - state we allow automatic payment methods, but no redirect
Use the new Subscription Schedules so that downgrade will only apply
from the next billing period.
You cannot cancel a subscription with a schedule.
@dracos dracos merged commit 370651f into master Oct 10, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

3 participants