Configuring Apple Pay Response Handling
Configure one of the following decryption methods that will handle the response
payload of a successful Apple Pay transaction.
- After the payment token is received, the transaction is finalized when you extract and decrypt the payment data.
- :CybersourceDecryptionThis method forwards the encrypted payment data to your order management system. Use theCybersourceAPI to submit the authorization request, and include the Base64-encoded value obtained from thepaymentDataobject in theencryptedPayment_datafield.Example ofCybersourcedecryption:session.onpaymentauthorized = function (event) { var paymentDataString = JSON.stringify(event.payment.token.paymentData); var paymentDataBase64 = btoa(paymentDataString); }
- Merchant Decryption:This method forwards the encrypted payment data to your order management system to decrypt. Use theCybersourceAPI to submit the authorization request and include the decrypted payment data.For detailed information about decryption, see Payment Token Format Reference in the Apple Developer Center.