PHPackages                             eo/passbook - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eo/passbook

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eo/passbook
===========

iOS Passbook for PHP

v3.1.5(1y ago)2651.6M↓25.9%52[8 issues](https://github.com/eymengunay/php-passbook/issues)2MITPHPPHP &gt;=7.4CI passing

Since Jun 5Pushed 6mo ago23 watchersCompare

[ Source](https://github.com/eymengunay/php-passbook)[ Packagist](https://packagist.org/packages/eo/passbook)[ Docs](https://github.com/eymengunay/php-passbook)[ GitHub Sponsors](https://github.com/eymengunay)[ GitHub Sponsors](https://github.com/razvanphp)[ RSS](/packages/eo-passbook/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (22)Used By (2)

PHP PASSBOOK LIBRARY
====================

[](#php-passbook-library)

[![Code Coverage](https://camo.githubusercontent.com/d77d623849bfadc3d6b67d65a42cafde52c686d510fce8e4d151db85b44e2384/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f65796d656e67756e61792f7068702d70617373626f6f6b2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eymengunay/php-passbook/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a36a165e370c03b270f8c4bc9882f5819a80056c5b69b35688e3f247cc7732c7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f65796d656e67756e61792f7068702d70617373626f6f6b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eymengunay/php-passbook/?branch=master)[![PHPUnit](https://github.com/eymengunay/php-passbook/actions/workflows/test.yml/badge.svg)](https://github.com/eymengunay/php-passbook/actions/workflows/test.yml)[![Total Downloads](https://camo.githubusercontent.com/e53b21fe2b14df3967a4e63dbaedf67796e8f9e07f6a0b3e013864b3e5e1a8d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656f2f70617373626f6f6b2e737667)](https://packagist.org/packages/eo/passbook)[![Latest Stable Version](https://camo.githubusercontent.com/48713bf094e374ca98fa6b63116b0353995ef48190af9e7d398c5f4ea020856c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656f2f70617373626f6f6b2e737667)](https://packagist.org/packages/eo/passbook)

What is Passbook?
-----------------

[](#what-is-passbook)

> Passbook is an application in iOS that allows users to store coupons, boarding passes, event tickets, store cards, 'generic' cards and other forms of mobile payment.

What does this library do?
--------------------------

[](#what-does-this-library-do)

PHP-Passbook is a library for creating and packaging passes inside your application. Distribution of generated pass files can be done by attaching the file in an e-mail or serving it from your web server.

Breaking changes
----------------

[](#breaking-changes)

### Version 3.0.0

[](#version-300)

- Requires PHP &gt;= 7.4

### Version 2.0.0

[](#version-200)

- `Image` class `setRetina`/`isRetina` methods replaced with `setDensity`/`getDensity`.

Installing
----------

[](#installing)

### Using Composer

[](#using-composer)

To add PHP-Passbook as a local, per-project dependency to your project, simply add a dependency on eo/passbook to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a development-time dependency on the latest version of the library:

```
{
    "require": {
        "eo/passbook": "dev-master"
    }
}
```

API Doc
-------

[](#api-doc)

Search by class, method name, or package:

Usage Example
-------------

[](#usage-example)

This example will create a pass of type Ticket and will save the pkpass file in the output path specified. To use this example, you will need to do the following and set the constants accordingly:

- [Create a P12 Certificate file](#p12-certificate)
- [Download Apple’s World Wide Developer Relations (WWDR) certificate](#wwdr-certificate)
- [Obtain a Pass Type Identifier and Team Identifier from Apple](#obtaining-the-pass-type-identifier-and-team-id)
- Get an icon (29x29 png file) for the pass
- Specify a name for your organization
- Specify the output path where the pass will be saved

```
