Skip to content

Commit

Permalink
Merge pull request #104 from willhnation/main
Browse files Browse the repository at this point in the history
Add check for original transaction identifier
  • Loading branch information
alexanderjordanbaker committed Aug 22, 2024
2 parents c1b942e + 5947281 commit af4163b
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 af4163b

Please sign in to comment.