Download the PHP package asteriskpound/laravel-iap-verification without Composer
On this page you can find all versions of the php package asteriskpound/laravel-iap-verification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asteriskpound/laravel-iap-verification
More information about asteriskpound/laravel-iap-verification
Files in asteriskpound/laravel-iap-verification
Package laravel-iap-verification
Short Description Server-side in-app-purchase receipt verification and webhook handling for Apple App Store and Google Play — plain Laravel, no NativePHP dependency.
License MIT
Informations about the package laravel-iap-verification
laravel-iap-verification
Server-side in-app-purchase receipt verification and webhook handling for the Apple App Store and Google Play — plain Laravel, no NativePHP dependency. Usable by any Laravel app, mobile or not.
Pairs with asteriskpound/nativephp-mobile-payments if your purchases come from a NativePHP app, but doesn't
require it — any source of a transaction ID / purchase token works.
Status: scaffolding. The Apple/Google client wrappers and webhook controllers are a first pass, not yet run against a real sandbox purchase or a live webhook delivery.
Install
Set in .env (see config/iap-verification.php for what each does):
Usage
On iOS, transactionId may be either the bare transaction ID or the StoreKit 2 signed transaction (JWS) the
device hands you — the ID is read from the JWS payload and looked up against Apple.
Store $result->originalTransactionId against the user you grant to. It stays the same across every renewal
of the subscription (Apple's originalTransactionId, Google's purchase token), so it's the key for keeping one
store subscription bound to one account and for matching webhook events back to that account.
Webhooks
Two routes are registered automatically (disable via IAP_VERIFICATION_REGISTER_ROUTES=false and mount them
yourself if you'd rather):
POST /iap-verification/webhooks/apple— register this URL in App Store Connect as your App Store Server Notifications V2 endpoint.POST /iap-verification/webhooks/google— point a Google Cloud Pub/Sub push subscription at this URL, configured for Real-time Developer Notifications in Play Console. Enable authentication on the subscription and setIAP_VERIFICATION_GOOGLE_PUBSUB_SERVICE_ACCOUNTto the service account it uses andIAP_VERIFICATION_GOOGLE_PUBSUB_AUDIENCEto its audience (by default the endpoint URL). Each push's signed OIDC token is verified against both; with either unset, every push is rejected.
Both dispatch Laravel events (SubscriptionRenewed, SubscriptionExpired, SubscriptionRefunded,
SubscriptionRevoked) — listen for those in your own app to keep your entitlement model in sync. This
package deliberately doesn't assume your schema; it only tells you what happened. Every event carries
originalTransactionId for that matching. Google's notifications carry no expiry date, so on
SubscriptionRenewed with a null expiresDate, re-verify the purchase token to get the new one.
License
MIT
All versions of laravel-iap-verification with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
aporat/store-receipt-validator Version ^9.0
google/apiclient Version ^2.18