-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: ignore 404 when canceling subscription in Stripe #2347
Conversation
[puLL-Merge] - brave-intl/bat-go@2347 DescriptionThis pull request makes changes to the ChangesChanges
Security Hotspots
|
Oh, what age we are living in. 🤦♀️ . Go away, robot. |
params := &stripe.SubscriptionSearchParams{} | ||
params.Query = *stripe.String(fmt.Sprintf("status:'active' AND metadata['orderID']:'%s'", orderID.String())) | ||
params.Query = fmt.Sprintf("status:'active' AND metadata['orderID']:'%s'", orderID.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clD11 Decided to keep this 'active' here for now as we are not really interested in canceling already canceled subs.
What do you think?
Summary
This PR updates the processing of an iOS webhook so that it only cancels an order in SKUs, and does not attempt to cancel it in Stripe, because there is obviously no such subscription.
There are many issues with the existing code for handling iOS webhook, but for now this is only to fix the cancelation. Other improvements will be made at a different time.
Type of Change
Tested Environments
Before Requesting Review
Manual Test Plan