apple / app-store-server-library-python

MIT License
168 stars 31 forks source link

Getting '0' as a result of extract_transaction_id_from_app_receipt #67

Closed liorshk closed 8 months ago

liorshk commented 8 months ago

Hi,

We are trying to use this package for backend validation of the in-app purchase. We followed all of your guidelines and request_test_notification and verify_and_decode_notification works fine. However, when we try to call extract_transaction_id_from_app_receipt we get a response "0" which is an invalid transaction id. The receipt looks like: app_receipt = "MIAGCSqGSIb3DQEHAqCAMIAC....." which seems valid.. We are using https://pub.dev/packages/in_app_purchase to handle the purchases and the app_receipt is purchaseDetails.verificationData.serverVerificationData

Any assistance would be appreciated.

alexanderjordanbaker commented 8 months ago

Hello, was this receipt generated using testing with Xcode, those receipts often contain 0 as the TID? One of the telltale signs is it ends with a bunch of AAAA in the Base64

liorshk commented 8 months ago

Yes, that's correct. That's probably the issue.. It's probably not using the Sandbox environment. Thanks!