PHPackages                             yousefkadah/apple-pay-decoder - 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. [Payment Processing](/categories/payments)
4. /
5. yousefkadah/apple-pay-decoder

ActiveLibrary[Payment Processing](/categories/payments)

yousefkadah/apple-pay-decoder
=============================

A PHP library for decrypting Apple Pay payment tokens (EC\_v1) with production-ready cryptographic operations

2113↓100%PHPCI failing

Since Jun 28Pushed 10mo agoCompare

[ Source](https://github.com/yousefkadah/php-apple-pay-decoder)[ Packagist](https://packagist.org/packages/yousefkadah/apple-pay-decoder)[ RSS](/packages/yousefkadah-apple-pay-decoder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Apple Pay Decoder for PHP
=========================

[](#apple-pay-decoder-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/afaa931e319fb50023eaa49ce90b73d35d962b0bf1464b97bed46cda0000126c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796f757365666b616461682f6170706c652d7061792d6465636f6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yousefkadah/apple-pay-decoder)[![Tests](https://camo.githubusercontent.com/8c1d2cf52adaa803b8f0b75bb4c32c3bc65ce9cf56d944372cf63aae1ef68ea6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796f757365666b616461682f6170706c652d7061792d6465636f6465722f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/yousefkadah/apple-pay-decoder/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2181e59340688634dd39b2895824adab9eff3b5abb3fd515428078221d774e8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796f757365666b616461682f6170706c652d7061792d6465636f6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yousefkadah/apple-pay-decoder)[![License](https://camo.githubusercontent.com/90d4c6ab98c00c0cef11f93724508e2cce40757daa97262d3eeb5abcce463640/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f796f757365666b616461682f6170706c652d7061792d6465636f6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yousefkadah/apple-pay-decoder)

A production-ready PHP library for decrypting Apple Pay payment tokens using real cryptographic operations. This package implements the complete EC\_v1 token decryption process including ECDH key agreement, KDF derivation, and AES-GCM decryption.

Features
--------

[](#features)

- ✅ **EC\_v1 Token Support**: Full support for Apple Pay's EC\_v1 encrypted payment tokens
- ✅ **Production Ready**: Real cryptographic operations using OpenSSL
- ✅ **Security First**: Proper validation and error handling
- ✅ **Framework Agnostic**: Works with any PHP framework or standalone
- ✅ **PSR-4 Compatible**: Modern PHP package structure
- ✅ **Well Tested**: Comprehensive test suite
- ✅ **Type Safe**: Full PHP 8+ type declarations

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- OpenSSL extension
- JSON extension

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require yousefkadah/apple-pay-decoder
```

Quick Start
-----------

[](#quick-start)

### Method 1: Using the Facade (Easiest)

[](#method-1-using-the-facade-easiest)

```
