ladeiko / node-apple-receipt-verify

A Node.js module for In-App-Purchase receipt validation for iOS.
MIT License
92 stars 25 forks source link

Getting Error 21004 on non auto-renewing subscription #15

Closed YogiBear52 closed 8 months ago

YogiBear52 commented 4 years ago

Hello,

I am using this library already few months, and I have been starting to get this '21004' lately and constantly on each 'Consumable' product.

After looking on these posts: https://developer.apple.com/forums/thread/72991 https://developer.apple.com/forums/thread/126122?page=2

I have tried to remove the 'password' from the request content ('secret' as provided in config object) and everything works.

I guess Apple has just stringent their receipt validation API so now its possible to send the 'password' only for 'auto-renewing' subscription. It's working for me without the 'password' but I have no way to check it for other type of products like 'auto-renewing'.

By the way, in the Docs: secret - [string] [optional] - Apple shared secret (See it in iTunes Connect: Go to My Apps > (select your app) > In-App Purchases > View or generate a shared secret) [required] it's both [optional] and [required] :)

I guess to solve it we would have to make the 'secret' key optional.

Thanks

ladeiko commented 4 years ago

i can add special behavior for this situation: remove password from query when this error is returned and then make second try

mobyjames commented 3 years ago

tried this with curl and found that sending password to Apple for non-subscription results in 21003 for me.

ladeiko commented 8 months ago

specific case, closing