Download the PHP package passkit/passkit-php-grpc-sdk without Composer
On this page you can find all versions of the php package passkit/passkit-php-grpc-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download passkit/passkit-php-grpc-sdk
More information about passkit/passkit-php-grpc-sdk
Files in passkit/passkit-php-grpc-sdk
Package passkit-php-grpc-sdk
Short Description PHP gRPC SDK for Apple Wallet and Google Pay Membership / Loyalty / Access Cards, Coupons, Flights & Event-Tickets.
License MIT
Homepage http://passkit.com
Informations about the package passkit-php-grpc-sdk
PassKit PHP SDK
Use the PassKit PHP gRPC SDK to issue and manage Apple Wallet and Google Pay Passes from your PHP application.
For more information, please visit the documentation.
Table Of Contents
- Requirements
- Installation
- Getting Started
- PassKit Portal
- Known Issues & Unsupported Endpoints
- Getting Help
- Contributing
- Author & License
Requirements
- PHP 7.0 or higher.
- PECL.
- Composer.
- A PassKit account; sign up for free at https://app.passkit.com.
- Your SDK API credentials (Home >> Account >> Developer Tools >> Generate New SDK Credentials).
Installation
Instal & Enable the gRPC PHP extension
After installing the gRPC extension, make sure the extension is enabled in your php.ini
file, (e.g. /etc/php5/cli/php.ini
, /etc/php5/apache2/php.ini
, or /usr/local/etc/php/7.2/php.ini
), depending on where your PHP installation is.
For detailed steps visit the gRPC PHP quickstart.
Add bindings to composer
To install the bindings via Composer, add the following to composer.json
:
Then run composer install
Manual Installation
Clone the repo and include autoload.php
:
Getting Started
Follow the installation procedure, and see general usage format & examples below.
Authorization
Simply request your SDK credentials from the PassKit Portal. You will receive an email with your credentials on your registered email address.
Follow the instructions in the email to decrypt key.pem
, and then copy the .pem
files into your project (in this project & for the examples to work they should be in the certs
directory).
You will need the credentials when you setup the SSL connection to the server.
Your credentials consist of 3 files:
ca-chain.pem
: the PassKit CA chain.certificate.pem
: the certificate for your account.key.pem
: the key that belongs to your certificate.
Setting up the connection:
General Instructions
The general format is shown below. Each API has its own client that you will need to initialise. Clients can re-use the credentials object.
General format:
Examples
The examples folder contains working samples for using the SDK.
To successfully run the program:
- ensure your gPRC certificates are in the
certs
folder in this repo (you will needca-chain.pem
,certificate.pem
&key.pem
). - modify the variables with the values for your programs & campaigns.
- run
cd examples && php enrol-member.php
.
PassKit Portal
The https://app.passkit.com allows you to easily design loyalty cards, membership cards and coupons for both Apple Wallet and Google Pay.
Additionally, the PassKit portal facilitates management, distribution and simple analysis of your Mobile Wallet projects.
Best Practices:
- Use the web portal for initial account and project setup.
- Then use the SDKs / APIs to issue, update and delete your individual passes.
Known Issues & Unsupported Endpoints
The following methods are currently not implemented:
Members:
- Update Members by Segment: can be done by updating individual members and looping on client side
- Delete Members by Segment: can be done by deleting individual members and looping on client side
- Check In / Out Member
Coupons:
- GetAnalytics
Getting Help
Contributing
Send bug reports, feature requests and code contributions into this repository.
Author & License
PassKit Inc.: [email protected]
Distributed under MIT License. Details available in license file.