Galette

Plugin to handle membership fees and donations payments with Stripe

Плагін спільноти

This plugin provides:

Payment form visible by users *not logged* into their
account

Note — This plugin requires your Galette instance to be publicly reachable and served with a valid SSL certificate.

Installation

First of all, download the plugin:

Extract the downloaded archive into Galette plugins directory. For example, on Linux (replacing {url} and {version} with the corresponding values):

$ cd /var/www/html/galette/plugins
$ wget {url}
$ tar xjvf galette-plugin-stripe-{version}.tar.bz2

Database initialisation

In order to work, this plugin requires several tables in the database. See the Galette plugins management interface.

And that’s it; the Stripe plugin is installed. :)

Plugin usage

Once the plugin is installed, a Stripe group is added to the Galette menu when a user is logged-in, allowing administrators and staff members to define the settings of the plugin and view the payments history.

Plugin's menu

The payment form is available from Galette’s public pages.

Only logged-in users can pay contributions with membership extension (or membership fees).

Payment form visible by logged-in users

Visitors (users not logged into their account) can only pay contributions without a membership extension (or donations). In this case, no contribution is automatically created in Galette, the payment only appears in the plugin’s payment history with the value “None” in the “Member” column.

Payment history screen

Settings

Settings screen

Note — It is possible to decide who can access the payment form in Galette’s settings. Choose the desired option in the public pages visibility parameters.

Note about the sandbox mode

Stripe sandbox mode

It is recommended to test the plugin’s functionality in sandbox mode. To learn how to set up such a testing environment, please refer to the Stripe documentation.

Warning — In this mode, never use real credit card numbers, but only test cards (see the list of test cards from the Stripe documentation)

Configure your Stripe account

To learn how to create an account, please refer to the Stripe documentation.

Get the country and currency defined in your account settings

The choice of a country and a currency is usually requested when creating your account. You can find this information in your account settings:

Stripe settings menu

Country defined in the account settings

Currency defined in the account settings

Create a Webhook and get the corresponding secret key

The Webhook required for the proper functioning of the plugin can be created from the Developers menu (located at the bottom left of your dashboard):

Webhooks in developers menu

The Endpoint URL to define in your webhook is indicated in the plugin settings (example: https://YOUR_DOMAIN_NAME/plugins/stripe/webhook).

Only one Event needs to be defined in your webhook. It is also indicated in the plugin settings; it is payment_intent.succeeded.

Webhook created in Stripe account

Once created, you need to get the webhook secret key to define in the plugin settings. From the list of webhooks, click on the one your created:

Webhooks list in Stripe account

The webhook secret key can be copied from it’s details:

Webhook secret

Get the API keys

The API keys required for the proper functioning of the plugin can be obtained from the Developers menu (located at the bottom left of your dashboard):

API keys in developers menu

Note — To reduce the potential impact of a compromise, create a Restricted key. This key can be created without customizing the permissions. Please refer to the Stripe documentation for more information about restricted keys.

API keys created in Stripe account

Enable the necessary payment methods

Stripe offers many payment methods. In your account settings, you should enable only the methods you wish to use.

Payment methods defined in the account
settings