Download the PHP package remp/crm-wallet-pay-module without Composer
On this page you can find all versions of the php package remp/crm-wallet-pay-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download remp/crm-wallet-pay-module
More information about remp/crm-wallet-pay-module
Files in remp/crm-wallet-pay-module
Package crm-wallet-pay-module
Short Description CRM Wallet Pay Module (Apple Pay and Google Pay support)
License MIT
Homepage https://remp2030.com
Informations about the package crm-wallet-pay-module
CRM Wallet Pay module
This module provides integration of the Apple Pay and Google Pay payment gateways into the sales funnels.
Currently the module supports gateway implementation using Tatrabanka provider. This provider currently does not support recurrent payments.
Installation
To install the module, run:
Enable installed extension in your app/config/config.neon
file:
To have the module functionality available in sales funnels, copy assets by running this command in the application root folder (or run composer install
, which install assets as well):
Integration
Apple Pay button
Configuration
In CRM settings (crm.press/admin/config-admin/
) Payments section, configure Apple Pay options. These include paths to Apple Pay merchant ID certificate and key (including password, if encrypted).
For more information, consult the official documentation on how to Set Up Apple Pay.
Requirements
Apple Pay requires HTTPS webpage with valid TLS certificate.
Usage in sales funnel
First, add "ApplePay Wallet" payment gateway to the list of allowed gateways in the sales funnel settings in CRM admin.
Next, include the WalletPay JS library in the sales funnel <head>
tag (if not already included):
To display the button itself, insert the following code snippet somewhere in your HTML document. Note the hidden
class - button should be hidden at first, before we check Apple Pay availability.
Properties of the button are described in the official documentation, including the CSS styling.
Next, make sure to check Apple Pay is available in the current browser context:
To initialize the button, run the initApplePayButton
. The most basic configuration:
Alternatively, you can provide onSuccess
callback, which gives you control of processing of the Apple Pay token issued during the payment:
Pay button update
To update price or product name of the button, call:
Google Pay
Configuration
To set up Google Pay and obtain required credentials, please follow the official documentation on Google Pay for web.
Requirements
Google Pay requires HTTPS webpage with valid TLS certificate.
Usage in sales funnel
First, add "GooglePay Wallet" payment gateway to the list of allowed gateways in the sales funnel settings in CRM admin.
Next, include the WalletPay JS library in the sales funnel <head>
tag (if not already included):
To display the button itself, insert the following code snippet somewhere in your HTML document.
All properties of the button are described in the GitHub documentation.
To initialize the button, run the initGooglePayButton
. The most basic configuration:
Alternatively, provide onSuccess
callback, which gives control of processing of the Google Pay token issued during the payment and location to put 3DS dialog HTML code:
Pay button update
To update price of the button, call:
Extension
If you want to use your own gateway provider (instead of Tatrabanka), you can extend this module with your own implementation. Please note that this module does not provide support for direct wallet pay payments.
First, you need to implement the integration by providing the implementation of the Google/Apple pay interfaces:
Crm\WalletPayModule\Model\GooglePayWalletInterface
Crm\WalletPayModule\Model\ApplePayWalletInterface
When they're ready, register them in your config.neon
file and override the default implementation provided by this module:
API documentation
All examples use http://crm.press
as a base domain. Please change the host to the one you use
before executing the examples.
API responses can contain following HTTP codes:
Value | Description |
---|---|
200 OK | Successful response, default value |
400 Bad Request | Invalid request (missing required parameters) |
403 Forbidden | The authorization failed (provided token was not valid) |
404 Not found | Referenced resource wasn't found |
If possible, the response includes application/json
encoded payload with message explaining
the error further.
GET /api/v1/apple-pay/merchant-validation
API call that validates Apple Pay merchant identity.
Params:
Name | Value | Required | Description |
---|---|---|---|
url | String | yes | Validation URL, as described in the Apple Pay Merchant Validation docs. It should be retrieved from ApplePaySession 's onvalidatemerchant event handler. |
Example:
Response:
Response may vary, since it contains data returned by Merchant Validation service provided by Apple.