remp / crm-apple-appstore-module
CRM Apple AppStore Module
Package info
github.com/remp2020/crm-apple-appstore-module
pkg:composer/remp/crm-apple-appstore-module
Requires
- php: ^8.3
- aporat/store-receipt-validator: ^4.2
- readdle/app-store-server-api: ^3.5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 5.2.0
- 5.1.0
- 5.0.1
- 5.0.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.2.0
- 1.1.0
- 1.0.0
- 1.0.0-beta2
- 1.0.0-beta1
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.1
- 0.21.0
- 0.20.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
This package is auto-updated.
Last update: 2026-11-06 09:22:32 UTC
README
Installation
We recommend using Composer for installation and update management. To add CRM Apple AppStore extension to your REMP CRM application use following command:
composer require remp/crm-apple-appstore-module
Enable installed extension in your app/config/config.neon file:
extensions: # ... - Crm\AppleAppstoreModule\DI\AppleAppstoreModuleExtension
Add database tables and seed Apple AppStore payment gateway and its configuration:
php bin/command.php phinx:migrate php bin/command.php application:seed
Configuration
Module uses default implementation of ServerToServerNotificationProcessorInterface to match notification with system's user and subscription type.
- If subscription type cannot be matched, processor returns an error and doesn't acknowledge the notification.
- If user cannot be matched, processor creates anonymous unclaimed user (user with
user_metaflagUnclaimedUser::META_KEYset to true). This is needed to fulfill Apple's rules - user registration cannot be prerequisite of iOS in-app purchases.
If you want to control this process and match the user/subscription type based on your own criteria, or if you want to acknowledge the notification but skip the processing if user/subscription type cannot be matched, you can create your own implementation of interface and use it in your config file:
services: serverToServerNotificationProcessor: Crm\FooModule\Models\AppleAppstore\ServerToServerNotificationProcessor
For the Apple App Store Server API v2 notifications, the user and the subscription type are resolved by
the appleAppstoreUserResolver and appleAppstoreSubscriptionTypeResolver services. Override them to
change how notifications are matched:
services: appleAppstoreUserResolver: Crm\FooModule\Models\AppleAppstore\UserResolver appleAppstoreSubscriptionTypeResolver: Crm\FooModule\Models\AppleAppstore\SubscriptionTypeResolver
UserResolver splits the matching into resolveByAppAccountToken(), resolveByOriginalTransactionId()
and createUnclaimedUser(), so an extending class can replace just one of the steps.
Enable Server-To-Server notifications
Apple Developer Documentation contains steps how to enable Server-to-Server Notification.
Support Notes
unified_receipt.latest_receipt_info.quantitymust be 1. We allow only one subscription per payment.