- How do I generate a boarding pass for Apple Wallet and Google Wallet in Laravel?
- Use the `ApplePassBuilder` and `GooglePassBuilder` classes to define pass details like serial number, organization name, and expiration date. For example, `$pass = ApplePassBuilder::make()->setSerialNumber('UNIQUE_ID')->setOrganizationName('Your Company');` Then call `addToWalletUrl()` to generate the install link.
- What Laravel versions does spatie/laravel-mobile-pass support?
- The package is fully compatible with Laravel 10 and 11. No breaking changes have been introduced in recent updates, so existing projects should work without modification.
- How do I push updates to an existing Google Wallet pass?
- Use the `pushUpdate()` method on your pass model. Ensure your pass has a unique serial number and is stored in your database. The package handles the signing and validation automatically, including the new ECv2SigningOnly requirement for Google Wallet.
- Does this package require any PHP extensions or additional libraries?
- No extra PHP extensions are required. The package relies on Laravel’s built-in features and handles all platform-specific signing logic internally. Ensure your server meets Laravel’s general requirements (e.g., OpenSSL for HTTPS).
- How do I verify Google Wallet webhook callbacks after the ECv2SigningOnly update?
- Update your callback verification logic to explicitly use the `ECv2SigningOnly` method. For example, replace `GoogleWallet::verify($payload)` with `GoogleWallet::verify($payload, 'ECv2SigningOnly')`. Test thoroughly in a staging environment to ensure compatibility.
- Can I use this package for membership cards or loyalty programs?
- Absolutely. The package supports all pass types, including membership cards, gift cards, and loyalty programs. Customize the design and fields using the builder methods, such as `setHeaderFields()` or `setStoreCardFields()` for store-specific passes.
- What happens if my Google Wallet pass signing fails due to the new ECv2SigningOnly requirement?
- The package provides clear error messages if signing fails. Ensure your server has the correct private key and certificate configured. For production, implement retry logic or fallback notifications to users if updates cannot be pushed.
- How do I test Google Wallet pass generation before deploying to production?
- Use Google Wallet’s [test environment](https://developers.google.com/wallet/digital/test) to validate pass generation and updates. The package’s demo at [mobile-pass-demo.spatie.be](https://mobile-pass-demo.spatie.be) also showcases real-world examples for reference.
- Are there any alternatives to spatie/laravel-mobile-pass for mobile pass generation?
- While this package is the most Laravel-native solution, alternatives include using Apple’s [PassKit](https://developer.apple.com/documentation/passkit) and Google’s [Wallet API](https://developers.google.com/wallet/digital) directly. However, they require manual handling of signing and updates, unlike this package’s streamlined approach.
- How do I configure the package for a multi-tenant Laravel application?
- Use Laravel’s Eloquent model binding to associate passes with tenants via a `tenant_id` column. Override the `getPassUrl()` method in your pass model to dynamically generate URLs based on the tenant’s domain or subdomain.