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

Cancellation flag is not checked for Apple Receipts #61

Closed
Ltty opened this issue Aug 9, 2016 · 7 comments
Closed

Cancellation flag is not checked for Apple Receipts #61

Ltty opened this issue Aug 9, 2016 · 7 comments

Comments

@Ltty
Copy link

Ltty commented Aug 9, 2016

If a subscription is cancelled by the user or if the payment process fails a cancellation date is added to the receipt by the apple server. This flag is currently not checked by your implementation. So the module will return false when calling isExpired() even though the receipt was cancelled and is no longer valid.

@voltrue2
Copy link
Owner

voltrue2 commented Aug 9, 2016

Hello

Thank you for reaching out!

Would you mind sharing the property that needs to be checked for this so I can implement it?

Cheers

On Aug 9, 2016, 21:39 +0900, Florian Lettner notifications@github.com, wrote:

If a subscription is cancelled by the user or if the payment process fails a cancellation date is added to the receipt by the apple server. This flag is currently not checked by your implementation. So the module will return false when calling isExpired() even though the receipt was cancelled and is no longer valid.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (#61), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACKY4WduBRhR-9mU1PzbBo74xEPiKB6yks5qeHUZgaJpZM4JgB8P).

@Ltty
Copy link
Author

Ltty commented Aug 9, 2016

Here's the explanation taken from Apple's web site:

Cancellation

A subscription is paid for in full when it’s purchased and can be refunded only by contacting Apple customer service. For example, if the user accidentally buys the wrong product, customer support can cancel the subscription and issue a refund. It’s not possible for customers to change their mind in the middle of a subscription period and decide they don’t want to pay for the rest of the subscription.

To check whether a purchase has been canceled, look for the Cancellation Date field in the receipt. If the field has a date in it, regardless of the subscription’s expiration date, the purchase has been canceled—treat a canceled receipt the same as if no purchase had ever been made.

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

The field is named cancellation_date

@voltrue2
Copy link
Owner

voltrue2 commented Aug 9, 2016

Awesome!
Thank you. I'll implement this as soon as I get a chance.

Cheers

On Aug 9, 2016, 21:47 +0900, Florian Lettner notifications@github.com, wrote:

Here's the explanation taken from Apple's web site:

Cancellation

A subscription is paid for in full when it’s purchased and can be refunded only by contacting Apple customer service. For example, if the user accidentally buys the wrong product, customer support can cancel the subscription and issue a refund. It’s not possible for customers to change their mind in the middle of a subscription period and decide they don’t want to pay for the rest of the subscription.

To check whether a purchase has been canceled, look for the Cancellation Date field in the receipt. If the field has a date in it, regardless of the subscription’s expiration date, the purchase has been canceled—treat a canceled receipt the same as if no purchase had ever been made.

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

The field is named cancellation_date


You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#61 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACKY4RLK5EvhDHE1XCcDFAIr-RYiADpVks5qeHb9gaJpZM4JgB8P).

@voltrue2
Copy link
Owner

voltrue2 commented Sep 1, 2016

I have implemented this in develop branch I will be running more tests before merging it to master and publish on npm

@jshanman
Copy link

Any update on returning apple cancellation_date field? I see it referenced in the apple.js file but it does not appear to be used at all.

@voltrue2
Copy link
Owner

voltrue2 commented Aug 1, 2017

Hello

My apologies for the long wait.
I'll be looking into this shortly.

Cheers

@voltrue2
Copy link
Owner

voltrue2 commented Sep 1, 2017

cancellation_date field is now being read by the module.

Closing

@voltrue2 voltrue2 closed this as completed Sep 1, 2017
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