-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add subscription deferral for Google play #59
base: master
Are you sure you want to change the base?
Conversation
I would love some feedback from other Google Play users (as I am not one). |
At our company we're running this code in production since January and have used this function a few thousand times (to delay some subscription payments). It's been stable and reliable so far, never had a problem with it. It would be great to see it merged 🚢 |
@antonio0 Could you update this to use Google API v3? |
@ronkorving just updated now to v3 |
|
||
if (!engine.deferSubscription) { | ||
return syncError(new Error(`Platform ${platform | ||
} does not have deferSubscription method`)); |
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.
Was the line too long for lint's liking?
[Apple] Check for cancellation_date_ms first If cancellation date is available it means that Apple Customer Support refunded subscription payment. From Apple: To check whether a purchase has been canceled by Apple Customer Support, look for the Cancellation Date field in the receipt. If the field contains a date, regardless of the subscription’s expiration date, the purchase has been canceled. With respect to providing content or service, treat a canceled transaction the same as if no purchase had ever been made.
Referencing the following documentation: https://developer.apple.com/documentation/appstorereceipts/status We can see that 21009 and 21010 are available codes we should handle.
@antonio0 With nine commits might make sense to squash? |
…nto google-defer
Implemented this functionality: https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/defer
I know for sure that Apple doesn't provide an analogous functionality, not sure about the other providers though.