Skip to content

Commit af4163b

Browse files
Merge pull request #104 from willhnation/main
Add check for original transaction identifier
2 parents c1b942e + 5947281 commit af4163b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

appstoreserverlibrary/receipt_utility.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
PKCS7_OID = "1.2.840.113549.1.7.2"
1111
IN_APP_ARRAY = 17
1212
TRANSACTION_IDENTIFIER = 1703
13+
ORIGINAL_TRANSACTION_IDENTIFIER = 1705
1314

1415
class ReceiptUtility:
1516
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[
7172
if (
7273
tag.typ == asn1.Types.Primitive
7374
and tag.nr == asn1.Numbers.Integer
74-
and value == TRANSACTION_IDENTIFIER
75+
and (value == TRANSACTION_IDENTIFIER or value == ORIGINAL_TRANSACTION_IDENTIFIER)
7576
):
7677
inapp_decoder.read()
7778
tag, value = inapp_decoder.read()

0 commit comments

Comments
 (0)