Download the PHP package pkpass/pkpass without Composer

On this page you can find all versions of the php package pkpass/pkpass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pkpass

PHP library to create passes for iOS Wallet

Packagist Version Packagist Downloads

This class provides the functionality to create passes for Wallet in Apple's iOS. It creates, signs and packages the pass as a .pkpass file according to Apple's documentation.

Requirements

Installation

Simply run the following command in your project's root directory to install via Composer:

Or add to your composer.json: "pkpass/pkpass": "^2.0.0"

Usage

Please take a look at the examples/example.php file for example usage. For more info on the JSON for the pass and how to style it, take a look at the docs at developers.apple.com.

Included demos

Functions to add files

Requesting the Pass Certificate

  1. Go to the iOS Provisioning portal.
  2. Create a new Pass Type ID, and write down the Pass ID you choose, you'll need it later.
  3. Click the edit button under your newly created Pass Type ID and generate a certificate according to the instructions shown on the page. Make sure not to choose a name for the Certificate but keep it empty instead.
  4. Download the .cer file and drag it into Keychain Access.
  5. Find the certificate you just imported and click the triangle on the left to reveal the private key.
  6. Select both the certificate and the private key it, then right-click the certificate in Keychain Access and choose Export 2 items….
  7. Choose a password and export the file to a folder.

Getting the example.php sample to work

  1. Request the Pass certificate (.p12) as described above and upload it to your server.
  2. Set the correct path and password on line 22.
  3. Change the passTypeIdentifier and teamIndentifier to the correct values on lines 29 and 31 (teamIndentifier can be found on the Developer Portal).

After completing these steps, you should be ready to go. Upload all the files to your server and navigate to the address of the examples/example.php file on your iPhone.

Debugging passes

If you aren't able to open your pass on an iPhone, plug the iPhone into a Mac and open the 'Console' application. On the left, you can select your iPhone. You will then be able to inspect any errors that occur while adding the pass:

Changelog

Version 2.1.0 - April 2023

Version 2.0.2 - October 2022

Version 2.0.1 - October 2022

Version 2.0.0 - September 2022

Support & documentation

Please read the instructions above and consult the Wallet Documentation before submitting tickets or requesting support. It might also be worth to check Stackoverflow, which contains quite a few questions about this library.




Get professional support for this package →
Custom consulting sessions availabe for implementation support and feature development.

All versions of pkpass with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-zip Version *
ext-json Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pkpass/pkpass contains the following files

Loading the files please wait ....