Hello,
I’m encountering an issue with Apple Wallet orders. Every time I send an order file to my iPhone, I get the error message: “Error reading order file.”
Steps Taken:
1. Order File Structure:
• I created an order.json file with the minimal required fields, including:
• Order Type Identifier (created on the Apple Developer portal)
• Merchant Identifier: (created on the Apple Developer portal)
• Status: open
• Other necessary fields, such as authenticationToken, createdAt, updatedAt, and payment.
2. Manifest and Signature:
• A manifest.json file was generated with the SHA-256 hash for each file (e.g., order.json, images).
• The manifest was signed using my Apple developer certificates:
• Signer Certificate: signerCert.pem
• Signer Key: signerKey.pem
• WWDR Certificate: wwdr.pem
• Verification of the manifest and signature was done using OpenSSL:
• Command used: openssl smime -verify -in signature -inform DER -content manifest.json -noverify
• The verification was successful, but the iPhone still returns the error.
3. File Packaging:
• The final package includes the following files:
• order.json
• Images (e.g., gardenya_logo.png)
• manifest.json
• signature
• The files were packaged into a .order file (renamed from .zip).
4. Apple WWDR Certificate:
• I used Apple WWDR MP CA 1 - G1 for signing the package.
Issue:
Despite following all steps in the Apple documentation, the order file cannot be read by the iPhone, and the error message displayed is “Error reading order file.”
Additional Information:
• Manifest and Signature: Both files have been validated and match the package contents.
• Apple Developer Certificates: Used valid Apple Developer certificates.
• Order Schema: The order.json file follows Apple’s schema for orders.
Could you please provide guidance on resolving this issue? Any suggestions on what could be causing the error, or additional steps to check, would be greatly appreciated.
Thank you for your support!
Hello @Engineer ,
My issue has been resolved; it was related to certificates (Failed to evaluate trust).
Process to follow:
- Create a Merchant Identifier ID.
- Create an Order Type Identifier ID.
- Download and install the WWDRCAG3 Certificate: Apple WWDRCAG3 Certificate (I am not sure if steps 1, 2, and 3 need to be in this specific order).
- In Keychain -> Keychain Access -> Certificate Assistant -> Request a Certificate from Certificate Authority -> Save to file.
- Create the Order Type ID Certificate and upload the file from step 4.
- Download the Order Type ID Certificate and install it.
- Export both the installed certificate and WWDRCAG3 from Keychain in
.p12
format. - Convert the
Certificate.p12
tocertificate.pem
andprivate_key.pem
. - Convert
WWDRCAG3.p12
toWWDRCAG3.pem
. - Use
certificate.pem
,private_key.pem
, andWWDRCAG3.pem
to sign themanifest.json
file.
Thank you.