All Projects β†’ flexible-agency β†’ Php Pkpass

flexible-agency / Php Pkpass

Licence: mit
πŸ’³ PHP class for creating passes for Wallet on iOS.

Labels

Projects that are alternatives of or similar to Php Pkpass

Awesome Coins
β‚Ώ A guide (for humans!) to cryto-currencies and their algos.
Stars: ✭ 3,469 (+414.69%)
Mutual labels:  wallet
Laravel Wallet
Easy work with virtual wallet
Stars: ✭ 401 (-40.5%)
Mutual labels:  wallet
Web3modal
A single Web3 / Ethereum provider solution for all Wallets
Stars: ✭ 515 (-23.59%)
Mutual labels:  wallet
Lunary Ethereum Wallet
A beautiful, secure and native Ethereum Wallet for Android
Stars: ✭ 348 (-48.37%)
Mutual labels:  wallet
Ledgerjs
Ledger's JavaScript libraries
Stars: ✭ 397 (-41.1%)
Mutual labels:  wallet
Burner Wallet
πŸ”₯πŸ‘›Burner Wallet to move crypto quickly in a web browser. Sweep to cold storage when you get home. πŸ πŸ‘¨πŸ»β€πŸš’
Stars: ✭ 448 (-33.53%)
Mutual labels:  wallet
Trezor Mcu
πŸ”’ Don't use this repo, use the new monorepo instead:
Stars: ✭ 315 (-53.26%)
Mutual labels:  wallet
Ethereumjs Wallet
Utilities for handling Ethereum keys
Stars: ✭ 653 (-3.12%)
Mutual labels:  wallet
Ethereumkit
EthereumKit is a free, open-source Swift framework for easily interacting with the Ethereum.
Stars: ✭ 400 (-40.65%)
Mutual labels:  wallet
Token Profile
Blockchain coin and token profile collection
Stars: ✭ 518 (-23.15%)
Mutual labels:  wallet
My Wallet V3 Android
Blockchain Android Wallet
Stars: ✭ 356 (-47.18%)
Mutual labels:  wallet
Anchor
EOSIO Desktop Wallet and Authenticator
Stars: ✭ 381 (-43.47%)
Mutual labels:  wallet
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions on Ethereum network.
Stars: ✭ 462 (-31.45%)
Mutual labels:  wallet
My Wallet V3
Blockchain Web Wallet Library - https://support.blockchain.com
Stars: ✭ 342 (-49.26%)
Mutual labels:  wallet
Skycoin
Skycoin Core and Wallet
Stars: ✭ 549 (-18.55%)
Mutual labels:  wallet
Web3j Sample
web3j 样例程序
Stars: ✭ 317 (-52.97%)
Mutual labels:  wallet
Plutus
An automated bitcoin wallet collider that brute forces random wallet addresses
Stars: ✭ 404 (-40.06%)
Mutual labels:  wallet
Ledger Live Desktop
Ledger Live (Desktop)
Stars: ✭ 656 (-2.67%)
Mutual labels:  wallet
Service My Wallet V3
Blockchain Wallet API Service
Stars: ✭ 644 (-4.45%)
Mutual labels:  wallet
Bitshares Ui
Fully featured Graphical User Interface / Reference Wallet for the BitShares Blockchain
Stars: ✭ 505 (-25.07%)
Mutual labels:  wallet

PHP library to create passes for iOS Wallet app

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

Requirements

  • PHP 5.6 or higher
  • PHP ZIP Support (may be installed by default)
  • Access to filesystem (script must be able to create temporary folders)

Installation

Composer

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

composer require pkpass/pkpass

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

Manually

Include the PKPass.php file in your PHP project:

require('src/PKPass.php');

Usage

Please take a look at the 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.

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 under 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.

Included demos

Functions to add files

  • addFile : add a file without locale like icon.png
  • addRemoteFile : add a file from a url without locale like https://xyz.io/icon.png
  • addLocaleFile : add a localized file like strip.png
  • addLocaleRemoteFile : add a localized file from a url like https://xyz.io/strip.png

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:

  • Trust evaluate failure: [leaf TemporalValidity]: If you see this error, your pass was signed with an outdated certificate.
  • Trust evaluate failure: [leaf LeafMarkerOid]: You did not leave the name of the certificate empty while creating it in the developer portal.

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.

Email me at thomas [at] scholica.com or tweet me @tschoffelen.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].