PHPackages                             payu/apple-pay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. payu/apple-pay

ActiveLibrary[Security](/categories/security)

payu/apple-pay
==============

ApplePay Token Decoder

1.4.0(4mo ago)511.0M↓57%37[3 issues](https://github.com/PayU-EMEA/apple-pay/issues)[2 PRs](https://github.com/PayU-EMEA/apple-pay/pulls)Apache-2.0PHPPHP ^7.4|^8.0CI failing

Since Feb 27Pushed 4mo ago20 watchersCompare

[ Source](https://github.com/PayU-EMEA/apple-pay)[ Packagist](https://packagist.org/packages/payu/apple-pay)[ Docs](https://github.com/PayU/apple-pay)[ RSS](/packages/payu-apple-pay/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

[![Travis CI](https://camo.githubusercontent.com/0e394f83957ebce67004c251d5d2c86780f2432620472dd9a838b64e04dcc108/68747470733a2f2f7472617669732d63692e6f72672f506179552d454d45412f6170706c652d7061792e737667)](https://travis-ci.org/PayU-EMEA/apple-pay) [![Latest Stable Version](https://camo.githubusercontent.com/c077501ce9b3d9a74e266e22daae3a35e872abbae3a36785c43b6841723d258b/68747470733a2f2f706f7365722e707567782e6f72672f706179752f6170706c652d7061792f762f737461626c652e737667)](https://packagist.org/packages/payu/apple-pay) [![Total Downloads](https://camo.githubusercontent.com/43adb1c8729d9b24226d122ba051955675a70f5ab424ba3b55ca9a5332645e4b/68747470733a2f2f706f7365722e707567782e6f72672f706179752f6170706c652d7061792f646f776e6c6f6164732e737667)](https://packagist.org/packages/payu/apple-pay) [![License](https://camo.githubusercontent.com/95c411fff6dad94dceaafaec5af49deedcd77d618ea0549a0923258b6757d3a0/68747470733a2f2f706f7365722e707567782e6f72672f706179752f6170706c652d7061792f6c6963656e73652e737667)](https://packagist.org/packages/payu/apple-pay)

**Apple Pay Token Decoder**

This library is used to decode tokens for Apple Pay.

It takes a payment token data and returns an ApplePayPaymentData object. ex:

```
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:**

Run `composer require payu/apple-pay`

**Get AppleRootCA-G3.pem:**

1. Download [AppleRootCA-G3.cer](https://www.apple.com/certificateauthority)
2. Run command: `openssl x509 -inform der -in AppleRootCA-G3.cer -out AppleRootCA-G3.pem`

**Get Private Key:**

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

**Usage:**

See [https://github.com/PayU/apple-pay/blob/master/examples/decode\_token.php](https://github.com/PayU/apple-pay/blob/master/examples/decode_token.php)

For more information about how Apple Pay tokens decoding works go to:

Only works on Linux hosts with openssl installed

For open pull requests please make sure the Travis build does not fail!

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance75

Regular maintenance activity

Popularity53

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 59.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~291 days

Recently: every ~441 days

Total

11

Last Release

133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8714fa223d32c91d96ba5aededaea9dba9b395eb7574732e5964c280d2b5efaf?d=identicon)[drealecs](/maintainers/drealecs)

![](https://avatars.githubusercontent.com/u/5352167?v=4)[Daniel Cata](/maintainers/trydocatch)[@trydocatch](https://github.com/trydocatch)

---

Top Contributors

[![trydocatch](https://avatars.githubusercontent.com/u/5352167?v=4)](https://github.com/trydocatch "trydocatch (47 commits)")[![sergeyzinder](https://avatars.githubusercontent.com/u/69752567?v=4)](https://github.com/sergeyzinder "sergeyzinder (9 commits)")[![willemstuursma](https://avatars.githubusercontent.com/u/701299?v=4)](https://github.com/willemstuursma "willemstuursma (6 commits)")[![drealecs](https://avatars.githubusercontent.com/u/209984?v=4)](https://github.com/drealecs "drealecs (5 commits)")[![foaieee](https://avatars.githubusercontent.com/u/45826035?v=4)](https://github.com/foaieee "foaieee (5 commits)")[![andreicio](https://avatars.githubusercontent.com/u/20474012?v=4)](https://github.com/andreicio "andreicio (3 commits)")[![gxgpet](https://avatars.githubusercontent.com/u/13217984?v=4)](https://github.com/gxgpet "gxgpet (2 commits)")[![vtychyna](https://avatars.githubusercontent.com/u/224998726?v=4)](https://github.com/vtychyna "vtychyna (1 commits)")[![FromSi](https://avatars.githubusercontent.com/u/22871855?v=4)](https://github.com/FromSi "FromSi (1 commits)")

---

Tags

apple-paydecryptionopensslphpphpopensslApple Paydecryption

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/payu-apple-pay/health.svg)

```
[![Health](https://phpackages.com/badges/payu-apple-pay/health.svg)](https://phpackages.com/packages/payu-apple-pay)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[camcima/dukpt-php

DUKPT implementation in PHP

26154.0k](/packages/camcima-dukpt-php)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

128.1k1](/packages/poly-crypto-poly-crypto)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
