Configuring Apple Pay Response Handling

Configure one of the following decryption methods that will handle the response payload of a successful Apple Pay transaction.
  1. After the payment token is received, the transaction is finalized when you extract and decrypt the payment data.
    • Cybersource
      Decryption
      :
      This method forwards the encrypted payment data to your order management system. Use the
      Cybersource
      API to submit the authorization request, and include the Base64-encoded value obtained from the
      paymentData
      object in the
      encryptedPayment_data
      field.
      Example of
      Cybersource
      decryption:
      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 the
      Cybersource
      API 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.