Skip to content

Commit 2345908

Browse files
Merge pull request #60 from alexanderjordanbaker/AppAppleIdProdEnvironment
Resolves https://github.com/apple/app-store-server-library-python/iss…
2 parents dbbd735 + 0d7e1a5 commit 2345908

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ root_certificates = load_root_certificates()
5858
enable_online_checks = True
5959
bundle_id = "com.example"
6060
environment = Environment.SANDBOX
61-
signed_data_verifier = SignedDataVerifier(root_certificates, enable_online_checks, environment, bundle_id)
61+
app_apple_id = None # appAppleId must be provided for the Production environment
62+
signed_data_verifier = SignedDataVerifier(root_certificates, enable_online_checks, environment, bundle_id, app_apple_id)
6263

6364
try:
6465
signed_notification = "ey.."

appstoreserverlibrary/signed_data_verifier.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def __init__(
4141
self._bundle_id = bundle_id
4242
self._app_apple_id = app_apple_id
4343
self._enable_online_checks = enable_online_checks
44+
if environment == Environment.PRODUCTION and app_apple_id is None:
45+
raise ValueError("appAppleId is required when the environment is Production")
4446

4547
def verify_and_decode_renewal_info(self, signed_renewal_info: str) -> JWSRenewalInfoDecodedPayload:
4648
"""

0 commit comments

Comments
 (0)