Open sabinayakc opened 4 years ago
You're absolutely right. I was wondering the same thing while validating my Android subscriptions. Possibly the Google API changed and @voltrue2 hasn't noticed or hasn't had the time to update.
For the time being, I added an additional validator for android.
Cancellation Issue:
Platform: Android
Description:
When an android subscription is cancelled,
iap.isCancelled()
returns false. Looking at the PurchaseItem response, there is no field called cancellationDate for android. Shouldn't the code below be checking foruserCancellationTimeMillis
for Android instead of cancellationDate? Same goes for isExpired() function.I haven't checked for IOS.
https://github.com/voltrue2/in-app-purchase/blob/e966ee1348bd4f67581779abeec59c4bbc2b2ebc/index.js#L261
An example subscriptionResponse:
{