2017 © Pedro Peláez
 

library apple-pay

ApplePay Token Decoder

image

payu/apple-pay

ApplePay Token Decoder

  • Wednesday, March 14, 2018
  • by trydocatch
  • Repository
  • 17 Watchers
  • 8 Stars
  • 84 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 4 Versions
  • 110 % Grown

The README.md

Travis CI Latest Stable Version Total Downloads License, (*1)

Apple Pay Token Decoder, (*2)

This library is used to decode tokens for Apple Pay., (*3)

It takes a payment token data and returns an ApplePayPaymentData object. ex:, (*4)

class PayU\ApplePay\Decoding\ApplePayPaymentData#19 (9) {
  private $version =>
  int(1)
  private $applicationPrimaryAccountNumber =>
  string(16) "20427527000"
  private $applicationExpirationDate =>
  string(6) "190731"
  private $currencyCode =>
  string(3) "643"
  private $transactionAmount =>
  int(100000)
  private $deviceManufacturerIdentifier =>
  string(12) "050103073"
  private $paymentDataType =>
  string(8) "3DSecure"
  private $onlinePaymentCryptogram =>
  string(28) "Am+7lPDbobAGVT7hNAoABA=="
  private $eciIndicator =>
  NULL
}

Install:, (*5)

Run composer require payu/apple-pay, (*6)

Get AppleRootCA-G3.pem:, (*7)

  1. Download AppleRootCA-G3.cer
  2. Run command: openssl x509 -inform der -in AppleRootCA-G3.cer -out AppleRootCA-G3.pem

Get Private Key:, (*8)

  1. Export merchant certificate to a p12 cert
  2. Use openssl to get the private key: openssl pkcs12 -in <your_cert>.p12 -out private_key.pem -nocerts -nodes
  3. Copy content without BEGIN and END markers

Usage:, (*9)

See https://github.com/PayU/apple-pay/blob/master/examples/decode_token.php, (*10)

For more information about how Apple Pay tokens decoding works go to: https://developer.apple.com/library/content/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html, (*11)

Only works on Linux hosts with openssl installed, (*12)

For open pull requests please make sure the Travis build does not fail!, (*13)

The Versions

14/03 2018

dev-master

9999999-dev https://github.com/PayU/apple-pay

ApplePay Token Decoder

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

php openssl decryption apple-pay

28/02 2018

1.0.3

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

ApplePay Token Decoder

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

php openssl decryption apple-pay

27/02 2018

1.0.2

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

ApplePay Token Decoder

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

php openssl decryption apple-pay

27/02 2018

1.0.1

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

ApplePay Token Decoder

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

php openssl decryption apple-pay