tikhop / TPInAppReceipt

Reading and Validating In App Purchase Receipt Locally.
MIT License
635 stars 95 forks source link

Purchase cancellationDate is not only for renewable subscribtions #100

Open sjvc opened 2 years ago

sjvc commented 2 years ago

Hello, and thank you for such great library.

The comment for cancellationDate says: Returns nil if the purchase is not a renewable subscription

But the docs say that this field is designed for use with auto-renewable subscription, non-consumable and non-renewing subscription products. So, although your comment don't say it, does this field get filled when using non-consumable products? If yes, I suggest changing the comment so it gets more clear.

Thank you, and best regards. Sergio.

tikhop commented 2 years ago

Hi @sjvc, Sorry, I missed your issue. I don't remember why I wrote that comment. Have you got a chance to check whether it's wrong on not? Thank you!

sjvc commented 2 years ago

Hi.

I'm not sure about it. Didn't test. I was hoping you knew it :)

By reading Apple docs, it seems it should get filled...

tikhop commented 2 years ago

@sjvc I wish I knew. I, mostly, work with auto-renewable subscriptions, but I will try someday to make sure how it really work. Thanks again for bringing it up.

revblaze commented 1 year ago

@tikhop @sjvc Could this theoretically be used for detecting refunded non-consumable purchases? ie. Deactivating a specific feature set that was previously activated due to a successful in-app purchase.

ripperhe commented 1 year ago

@sjvc @tikhop @revblaze Non-consumable purchases can use cancellationDate to verify if they are refunded. I have tested it.

tikhop commented 1 year ago

@ripperhe Thanks for verifying. I will update the comment and maybe we can also have a dedicated property whether the purchase is refunded or not.

Thanks again!