j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.3k stars 537 forks source link

Validation on Fovea fails with "The data in the receipt-data property was malformed or missing" (iOS) #1329

Closed macsupport closed 1 year ago

macsupport commented 1 year ago

Observed behavior

Validation fails in iOS ⚡️ [log] - InAppPurchase[js]: infoPlist: com.vetcalculators.emergency,1.0,16809984,null ⚡️ [log] - [store.js] DEBUG: scheduleValidation() ⚡️ [log] - [store.js] DEBUG: runValidation() ⚡️ [log] - [store.js] DEBUG: ajax -> send request to https://validator.fovea.cc/v1/validate?appName=com.vetcalculators.emergency&apiKey=c8246ccd-5246-4197-9674-5854f31d683e ⚡️ [log] - [store.js] DEBUG: validator success, response: {"ok":false,"route":"/v1/validate","status":400,"code":6778001,"message":"The data in the receipt-data property was malformed or missing.","data":{"code":6778001,"error":{"message":"The data in the receipt-data property was malformed or missing."}}}

Expected behavior

Validation should succeed

I have checked my Content-Security-Policy and added https://validator.fovea.cc, confirmed the API key, my setup on Apple seems correct with the subscription approved and valid. Stuck on what to do next. I want to convert an App with over 10,000 users to a subscription model but I need to have Fovea to be able to validate the subscription.

j3k0 commented 1 year ago

The problem was that is was a receipt generated locally with StoreKit testing.