cancel
Showing results for 
Search instead for 
Did you mean: 

Apple Pay Cannot be Decrypted

Hello I'm wondering if anyone can help me. I'm working on Authorize.Net integration with Apple Pay, we already have Authorize.Net working with credit card transactions, we have Apple Pay already working with Cybersource and can confirm the Apple Pay account is valid, the Apple Pay Merchant Id for Authorize.Net seems correct, and we’ve already tried recreating the certificate. . When we use Apple Pay with Authorize.Net, we continually get the error message saying "There was an error processing the payment data. Unable to decrypt data".  

We're creating a json string for our dataValue for the information from Apple and wondering if this is all the data needed and if this is the correct ordering for the json:

{

                "data":"placeholderData",

                "version":"EC_v1",

                "header":

                {

                                "applicationData":"",

                                "transactionId":"placeholderTransactionId",

"ephemeralPublicKey":"placeholderEphemeralPublicKey",

                                "publicKeyHash":"placeholderPublicKeyHash”

                                },

                "signature":" placeholderSignature"

}

After that we're serializing the json string to send in as a the dataValue as follows and wondering if it's an issue of a different serialization method is needed:

string dataValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(jsonApplePay));

Please let me know if you have any suggestions. 


Akhack
Contributor
1 REPLY 1

The "Unable to decrypt data" error you're encountering may be caused by a few issues. First, make sure the encryption and decryption keys between Apple Pay, Authorize.Net, and Cybersource are correctly aligned. Also, ensure all required fields, such as transaction information, are properly populated. Check if the system expects a Base64-encoded string rather than raw data. The signature should also be correctly generated and valid. Confirm that the Apple Pay version you're using is compatible with both Authorize.Net and Cybersource. Finally, verify that all necessary API headers are set correctly to avoid decryption issues.

randy456
New Member