PHPackages                             remp/crm-wallet-pay-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. remp/crm-wallet-pay-module

ActiveLibrary[Payment Processing](/categories/payments)

remp/crm-wallet-pay-module
==========================

CRM Wallet Pay Module (Apple Pay and Google Pay support)

5.0.1(1mo ago)03.4kMITPHPPHP ^8.3

Since Jun 24Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/remp2020/crm-wallet-pay-module)[ Packagist](https://packagist.org/packages/remp/crm-wallet-pay-module)[ Docs](https://remp2030.com)[ RSS](/packages/remp-crm-wallet-pay-module/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (28)Used By (0)

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
------------

[](#installation)

To install the module, run:

```
composer require remp/crm-wallet-pay-module
```

Enable installed extension in your `app/config/config.neon` file:

```
extensions:
	# ...
	- Crm\WalletPayModule\DI\WalletPayModuleExtension
```

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):

```
# run in CRM root folder
php bin/command.php application:install_assets
```

Integration
-----------

[](#integration)

### Apple Pay button

[](#apple-pay-button)

#### Configuration

[](#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](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay).

#### Requirements

[](#requirements)

Apple Pay requires HTTPS webpage with valid TLS certificate.

#### Usage in sales funnel

[](#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 `` 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](https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_css), including the [CSS styling](https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_css/styling_the_apple_pay_button_using_css).

Next, make sure to check Apple Pay is available in the current browser context:

```
// MERCHANT_ID is ID assigned in the Apple Pay settings
RempWalletPay.checkApplePayAvailability(MERCHANT_ID, function () {
    // called only if button should be displayed
    // remove 'hidden' class to display the button
    document.getElementsByTagName('apple-pay-button')[0].classList.remove('hidden');
});
```

To initialize the button, run the `initApplePayButton`. The most basic configuration:

```
const config = {
  totalPrice: '0.10',
  merchantName: 'Example Merchant s.r.o',
  productName: 'Example Product Name',

  // Function to retrieve sales funnel payment form data (will be sent together with Apple Pay token to backend).
  // Library takes care of response processing and redirect.
  salesFunnelFormData: () => {
    return new FormData(document.getElementById('form'));
  },

  // Optional, function returning true/false depending on whether Apple Pay execution should continue after clicking on the button.
  isValid: () => true,
};
RempWalletPay.initApplePayButton(config);
```

Alternatively, you can provide `onSuccess` callback, which gives you control of processing of the Apple Pay token issued during the payment:

```
const config = {
    totalPrice: '0.10',
    merchantName: 'Example Merchant s.r.o',
    productName: 'Example Product Name',

    // Callback, called after user confirms the payment in the Apple modal (e.g. by fingerprint).
    // It receives two arguments:
    // - token - Apple Pay token
    // - completePaymentCallback - callback, should be called after backend (un/successfully) ackowledges the payment
    onSuccess: (token, completePaymentCallback) =>  {
        var fd = new FormData(document.getElementById('form'));
        fd.append('apple_pay_token', token);

        fetch('/sales-funnel/sales-funnel-frontend/submit', {
            method: 'POST',
            body: fd,
        })
            .then(response => response.json())
            .then(data => {
                completePaymentCallback(true);
                window.top.location.href = data.apple_pay.redirect_url; // redirect to success page
            })
            .catch(e => completePaymentCallback(false));
    },

    // optional, function returning true/false depending on whether Apple Pay execution should continue after clicking on the Pay button.
    isValid: () => some_check_to_see_if_payment_form_is_valid(),
};
RempWalletPay.initApplePayButton(config);
```

#### Pay button update

[](#pay-button-update)

To update price or product name of the button, call:

```
RempWalletPay.updateApplePayButton({
    totalPrice: '0.20', // new price
    // productName: 'new product name',
});
```

### Google Pay

[](#google-pay)

#### Configuration

[](#configuration-1)

To set up Google Pay and obtain required credentials, please follow the official documentation on [Google Pay for web](https://developers.google.com/pay/api/web/guides/setup).

#### Requirements

[](#requirements-1)

Google Pay requires HTTPS webpage with valid TLS certificate.

#### Usage in sales funnel

[](#usage-in-sales-funnel-1)

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 `` 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](https://github.com/google-pay/google-pay-button/tree/main/src/button-element#properties).

To initialize the button, run the `initGooglePayButton`. The most basic configuration:

```
const config = {
    // price shown to user
    totalPrice: '0.10',
    // merchantId is one of the credentials obtain during configuration
    merchantId: '1234567890',
    // some merchant name to show to user
    merchantName: 'Example merchant',

    // Function to retrieve sales funnel payment form data (will be sent together with Google Pay token to backend).
    // Library takes care of response processing and redirect.
    salesFunnelFormData: () => {
        return new FormData(document.getElementById('form'));
    },

    // Optional, function returning true/false depending on whether Google Pay execution should continue after clicking on the button.
    isValid: () => true,

    // Optional, callback function to show progress during the payment
    inProgress: (promise) => {
        console.log("Google payment starts"); // here, display some animation
        promise.then(() => {
            console.log("Google payment starts"); // here, stop the animation
        });
    }
};
RempWalletPay.initGooglePayButton(config);
```

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:

```
const config = {
    // price shown to user
    totalPrice: '0.10',
    // merchantId is one of the credentials obtain during configuration
    merchantId: '1234567890',
    // some merchant name to show to user
    merchantName: 'Example merchant',

    // Callback, called after user confirms the payment in the Google Pay dialog.
    // Argument:
    // - token - Google Pay token
    onSuccess: (token) =>  {
        var fd = new FormData(document.getElementById('form'));
        fd.append('google_pay_token', token);

        fetch('/sales-funnel/sales-funnel-frontend/submit', {
            method: 'POST',
            body: fd,
        })
            .then(response => response.json())
            .then(data => {
                // if 'tds_html' attribute is present, 3DS is required
                if (data.google_pay.tds_html) {
                    // helper function to display 3DS html in an iframe modal
                    RempWalletPay.show3ds(data.google_pay.tds_html);
                } else {
                    // redirect to success page (no 3DS requirement to finish the payment)
                    window.top.location.href = data.google_pay.redirect_url;
                }
            });
    },

    // Optional, function returning true/false depending on whether Google Pay execution should continue after clicking on the button.
    isValid: () => true,

    // Optional, callback function to show progress during the payment
    inProgress: (promise) => {
        console.log("Google payment starts"); // here, display some animation
        promise.then(() => {
            console.log("Google payment starts"); // here, stop the animation
        });
    }
};
RempWalletPay.initGooglePayButton(config);
```

#### Pay button update

[](#pay-button-update-1)

To update price of the button, call:

```
RempWalletPay.updateGooglePayButton({
    totalPrice: '0.20', // new price
});
```

Extension
---------

[](#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:

```
services:
	applePayWallet: Crm\FooModule\Model\YourProviderApplePayWallet
	googlePayWallet: Crm\FooModule\Model\YourProviderGooglePayWallet
```

API documentation
-----------------

[](#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:

ValueDescription200 OKSuccessful response, default value400 Bad RequestInvalid request (missing required parameters)403 ForbiddenThe authorization failed (provided token was not valid)404 Not foundReferenced resource wasn't foundIf possible, the response includes `application/json` encoded payload with message explaining the error further.

---

#### GET `/api/v1/apple-pay/merchant-validation`

[](#get-apiv1apple-paymerchant-validation)

API call that validates Apple Pay merchant identity.

##### *Params:*

[](#params)

NameValueRequiredDescriptionurl*String*yesValidation URL, as described in the Apple Pay Merchant Validation [docs](https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/providing_merchant_validation). It should be retrieved from `ApplePaySession`'s [`onvalidatemerchant`](https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778021-onvalidatemerchant) event handler.##### *Example:*

[](#example)

```
curl -v –X GET http://crm.press/api/v1/apple-pay/merchant-identity?url=VALIDATION_URL
```

Response:

```
{
  "epochTimestamp": 1655206603128,
  "expiresAt": 1655210203128,
  "merchantSessionIdentifier": "...",
  "nonce": "SOME_NONCE",
  "merchantIdentifier": "...",
  "domainName": "crm.press",
  "displayName": "CRM",
  "signature": "SIGNATURE_DATA_BASE64",
  "operationalAnalyticsIdentifier": "DEVEL CRM:SOME_ID",
  "retries": 0,
  "pspId": "..."
}
```

Response may vary, since it contains data returned by Merchant Validation service provided by Apple.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance92

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~77 days

Total

27

Last Release

47d ago

Major Versions

0.39.0 → 1.2.02022-06-24

1.2.0 → 2.0.02022-08-25

2.11.0 → 3.1.02024-01-22

3.7.0 → 4.0.02025-04-02

4.4.0 → 5.0.02026-03-24

PHP version history (4 changes)0.39.0PHP ^7.4

2.0.0PHP ^8.0

3.1.0PHP ^8.1

5.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c733f9bd683c3814197d8a532b7da1ba1f631bb1efe1cde5f064feab1e24877?d=identicon)[rootpd](/maintainers/rootpd)

---

Top Contributors

[![markoph](https://avatars.githubusercontent.com/u/6843562?v=4)](https://github.com/markoph "markoph (8 commits)")[![miroc](https://avatars.githubusercontent.com/u/1230714?v=4)](https://github.com/miroc "miroc (8 commits)")[![rootpd](https://avatars.githubusercontent.com/u/812909?v=4)](https://github.com/rootpd "rootpd (7 commits)")[![lubos-michalik](https://avatars.githubusercontent.com/u/63700066?v=4)](https://github.com/lubos-michalik "lubos-michalik (1 commits)")

### Embed Badge

![Health badge](/badges/remp-crm-wallet-pay-module/health.svg)

```
[![Health](https://phpackages.com/badges/remp-crm-wallet-pay-module/health.svg)](https://phpackages.com/packages/remp-crm-wallet-pay-module)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
