Download the PHP package jolicode/wallet-kit without Composer

On this page you can find all versions of the php package jolicode/wallet-kit. 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 wallet-kit

wallet-kit
WalletKit
One fluent API to model Apple Wallet and Google Wallet payloads in typed PHP.

[![PHP Version Require](http://poser.pugx.org/jolicode/wallet-kit/require/php)](https://packagist.org/packages/jolicode/wallet-kit) [![Monthly Downloads](http://poser.pugx.org/jolicode/wallet-kit/d/monthly)](https://packagist.org/packages/jolicode/wallet-kit)

Overview

Wallet Kit helps you build the JSON payloads wallet platforms expect. It focuses on modeling and normalization (via Symfony Serializer): it does not sign Apple passes, bundle .pkpass files, call Google Wallet APIs, or tokenize Samsung Wallet payloads.

πŸ› οΈ Builder

The Jolicode\WalletKit\Builder namespace provides a fluent API centered on BuiltWalletPass (apple(), google(), samsung()). You can then normalize these models using Symfony Serializer along with this package's normalizers.

Cookbook (single-store appleOnly / googleOnly, every vertical, shared options, exceptions): docs/builder-examples.md.

Example β€” all platforms

🍏 Apple Wallet

Apple's model maps to a single tree: either use the builder above or build a Pass manually (see src/Pass/Apple/) and normalize it to the structure that becomes pass.json inside a pass package. Images, manifest, and cryptographic signing are still your responsibility.

πŸ€– Google Wallet

Google's API splits each pass type into two resources: a class (shared template) and an object (one per holder). The object references the class through classId. This library exposes both sides under src/Pass/Android/ for: EventTicket, Flight, Generic, GiftCard, Loyalty, Offer, and Transit. The builder returns that pair from BuiltWalletPass::google().

πŸ“± Samsung Wallet

Samsung Wallet uses a single unified JSON envelope: a Card containing type, subType, and a data array of card entries with attributes (type-specific fields). This library models 8 Samsung card types under src/Pass/Samsung/: BoardingPass, EventTicket, Coupon, GiftCard, Loyalty, Generic, DigitalId, and PayAsYouGo. The builder maps the 7 cross-platform verticals to their Samsung equivalents and returns a Card from BuiltWalletPass::samsung(). DigitalId and PayAsYouGo are Samsung-only types β€” build them directly via the model classes.

Install

Package layout

API spec checks (with Castor)

When Castor is available, you can verify that tracked baselines still match the Google Wallet discovery document, the Apple pass.json phpstan shapes, and the Samsung Wallet model shapes in this repo:

Command Purpose
castor spec:check:google Fetches the live Wallet Objects discovery and compares its revision to tools/spec/google-wallet-baseline.json.
castor spec:baseline:google After you update Android models for a new discovery revision, refreshes that JSON baseline.
castor spec:check:apple Regenerates a key list from src/Pass/Apple/Model @phpstan-type array shapes and diffs it against tools/spec/apple-pass-keyset.json.
castor spec:baseline:apple Rewrites apple-pass-keyset.json from the current phpstan definitions (run after intentional model changes).
castor spec:check:samsung Regenerates a key list from src/Pass/Samsung/Model @phpstan-type array shapes and diffs it against tools/spec/samsung-wallet-keyset.json.
castor spec:baseline:samsung Rewrites samsung-wallet-keyset.json from the current phpstan definitions (run after intentional model changes).

Scripts live under tools/spec/ and are also invoked by CI (spec-check job).

Next steps

The library today stops at typed payloads and normalization. Planned extensions include:

Other directions that often sit next to β€œwallet” libraries (for later consideration):

Contributions or design discussion for any of the above are welcome.

License

View the LICENSE file attached to this project.


JoliCode is sponsoring this project

All versions of wallet-kit with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
symfony/serializer Version ^7.4 || ^8.0
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 jolicode/wallet-kit contains the following files

Loading the files please wait ...