From 5947281b0e0cbff511eaf2e073abfc5ed4fc4091 Mon Sep 17 00:00:00 2001 From: willhnation Date: Thu, 15 Aug 2024 08:34:14 -0600 Subject: [PATCH] Add check for original transaction identifier --- appstoreserverlibrary/receipt_utility.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appstoreserverlibrary/receipt_utility.py b/appstoreserverlibrary/receipt_utility.py index 504005d..69f53d2 100644 --- a/appstoreserverlibrary/receipt_utility.py +++ b/appstoreserverlibrary/receipt_utility.py @@ -10,6 +10,7 @@ PKCS7_OID = "1.2.840.113549.1.7.2" IN_APP_ARRAY = 17 TRANSACTION_IDENTIFIER = 1703 +ORIGINAL_TRANSACTION_IDENTIFIER = 1705 class ReceiptUtility: def extract_transaction_id_from_app_receipt(self, app_receipt: str) -> Optional[str]: @@ -71,7 +72,7 @@ def extract_transaction_id_from_app_receipt(self, app_receipt: str) -> Optional[ if ( tag.typ == asn1.Types.Primitive and tag.nr == asn1.Numbers.Integer - and value == TRANSACTION_IDENTIFIER + and (value == TRANSACTION_IDENTIFIER or value == ORIGINAL_TRANSACTION_IDENTIFIER) ): inapp_decoder.read() tag, value = inapp_decoder.read()