Skip to content

Commit

Permalink
Add check for original transaction identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
willhnation committed Aug 15, 2024
1 parent 91ffc44 commit 5947281
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion appstoreserverlibrary/receipt_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5947281

Please sign in to comment.