Download the PHP package laulamanapps/wallet without Composer
On this page you can find all versions of the php package laulamanapps/wallet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laulamanapps/wallet
More information about laulamanapps/wallet
Files in laulamanapps/wallet
Package wallet
Short Description Platform-agnostic SDK for generating mobile wallet passes (Apple Wallet, Google Wallet)
License MIT
Informations about the package wallet
Wallet
Platform-agnostic PHP SDK for generating mobile wallet passes. Describe a pass once, generate it for every supported platform:
- Apple Wallet (
.pkpassfiles) via laulamanapps/apple-passbook - Google Wallet ("Save to Google Wallet" links) via laulamanapps/google-wallet
The core of this package contains no Apple- or Google-specific code: it defines a generic Pass
model, a PassGenerator contract, and a Wallet orchestrator. The platform bridges live behind
that contract, and the platform packages are optional dependencies — install only the engines you
need.
Installation
Or use one of the framework integrations, which wire the Wallet service and the platform
bridges from configuration:
- Symfony: laulamanapps/wallet-symfony
- Laravel: laulamanapps/wallet-laravel
Describe a pass
Generate for every platform
Serving the result
GeneratedPass tells you how the pass reaches the user:
| Apple | ||
|---|---|---|
| Delivery | Delivery::File |
Delivery::Url |
| Usage | Serve getContent() with getMimeType() (application/vnd.apple.pkpass) |
Redirect or link the user to getUrl() |
Custom platforms
Implement LauLamanApps\Wallet\PassGenerator and register it:
Lifecycle events
The package ships two platform-agnostic notification events:
LauLamanApps\Wallet\Event\PassInstalledEvent— a pass was added to a walletLauLamanApps\Wallet\Event\PassUninstalledEvent— a pass was removed from a wallet
Each event carries the platform ('apple', 'google', ...), the platform pass id (Apple serial
number, Google object id) and the native platform event for consumers that need platform detail.
The framework integrations dispatch them automatically: on Apple after a successful PassKit
device (un)registration, on Google after a signature-verified save/delete callback. Listen once,
cover every platform.
Platform notes
- Apple: the pass type identifier, team identifier and signing certificate are configured on
the apple-passbook
Compiler; the bridge mapsPassType::LoyaltyCardto Apple'sstoreCardstyle andPassType::BoardingPassto a generic transit type. Only images with a local path are embedded (ImageType::Herois Google-only). Locations become passlocations(lock-screen relevance);setWebService()becomeswebServiceURL/authenticationTokenin the pass. - Google: passes are generated as signed "Save to Google Wallet" links (no API call needed);
all pass types are mapped to Google's generic pass with your fields as text modules. Only images
with a public URL are used (
ImageType::LogoandImageType::Hero/ImageType::Strip). Locations becomemerchantLocations("Nearby Passes" notifications, first 10 locations);setWebService()is ignored — Google pushes updates through its REST API and reports saves/deletions via class callbacks. For Google-specific pass types (event ticket, offer, loyalty, transit objects) use laulamanapps/google-wallet directly.
Credits
License
This package is licensed under the MIT license.