How to decrypt payment token ?

Hi Guys,


I'm integrating Apple Pay but I can't decrypt Payment Token because I don't know where private key is


I'm using this code


https://github.com/PayU-EMEA/apple-pay


My error:

Decoding failed: 

Can't derive secret


or


Decoding failed: 

Unable to decrypt or to verify the tag.


When I test with demo code, it is working fine:

Decoded token is: 

object(PayU\ApplePay\Decoding\ApplePayPaymentData)#20 (9) {
  ["version":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  int(1)
  ["applicationPrimaryAccountNumber":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(16) "5204242750270010"
  ["applicationExpirationDate":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(6) "190731"
  ["currencyCode":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(3) "643"
  ["transactionAmount":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  int(100000)
  ["deviceManufacturerIdentifier":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(12) "050110030273"
  ["paymentDataType":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(8) "3DSecure"
  ["onlinePaymentCryptogram":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  string(28) "AOm+7lPDSbobAGVT7hmNAoABFA=="
  ["eciIndicator":"PayU\ApplePay\Decoding\ApplePayPaymentData":private]=>
  NULL
}


I think my private key is wrong


Can you help me to find the private key ?


Thank you !



iPad mini, iOS 12

Posted on Sep 29, 2020 9:21 PM

Reply

Similar questions

1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to decrypt payment token ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.