Skip to content

Magento ​

Introduction ​

Stancer offers simple, accessible and transparents payment infrastructures, to help entrepreneurs and company development on a daily basis. This official Module allow you to accept credit card payments with the Stancer platform directly on Magento. Before allowing payments with this module, you need to create a stancer account

Supported versions ​

MagentoPHP
2.x7.4 and above

API key generation ​

To be able to configure the Magento module, it is necessary to obtain information from your stancer account at https://manage.stancer.com/en/

Once connected, go to the "Developers" tab. On account creation, private and public test keys are automatically generated.

Api keys in the Developers tab

To get your Production keys, you need to finish your Stancer subscription and your account must be validated.

Step by step module install and setup ​

The module can be installed either using the Magento Marketplace (now Adobe Commerce Marketplace) or manually from the Gitlab repository. Please note that the Marketplace process is easier.

Initial Setup ​

For all the installation process, we assume that all the bash commands are typed in the Magento root directory (the install folder of Magento).

Backup Your site ​

Before starting the installation process, do a backup of your site your files and your database.

Go on maintenance mode ​

bash
php bin/magento maintenance:enable

Marketplace Installation ​

You'll need your Magento access keys during this install. To find them go to the Adobe Commerce marketplace. Once Connected go to: "My Profile" > "Marketplace tab" > "My Products" > "Access Keys" and use these keys.

  • Start by ordering the Stancer Module, (stancer/module-payments) on the marketplace
  • On your server, where Magento is installed, open a terminal in the install folder and write :
bash
composer require stancer/module-payments

It is strongly advised to define a precise version number like stancer/module-payments:1.1 in production.

If you haven't yet defined your magento key, you will be asked to enter them.

Manual Install ​

Download the Stancer Module in your webServer : Link to the Stancer ZIP module

extract the module ​

Go to the magento install folder and extract your zip in the folder app/code/StancerIntegration/Payments.

Updates your composer files ​

Open the compose.json file in the root folder of your installation and add the module path:

json
"repositories":[
  {
    "type": "path",
    "url": "app/code/StancerIntegration/Payments"
  }
]

Or directly in your terminal with :

bash
composer config repositories.stancer path app/code/StancerIntegration/Payments

Require the Module ​

Then you'll need to tell composer to use this module, with this command:

bash
composer require stancer/module-payments

This will specify a dependency to our module, installing it and its requirements.

It is strongly advised to define a precise version number like stancer/module-payments:1.1 in production.

::::

Setup your module ​

Once the module is installed you have to set it up.

Enable you Module ​

First enable it in the Magento back-office. Enter these commands in your terminal:

bash
php bin/magento module:enable StancerIntegration_Payments
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Deactivate the maintenance mode ​

Once the module is installed and activated you need to disable Magento's maintenance mode.

bash
php bin/magento maintenance:disable

Setup the module in the Magento Back-office ​

Go to your back-office at the Stores -> Configuration -> Sales -> Payment Methods page.

On this page click on the `configure` button in the Stancer Section.

API keys ​

  • Choose the module environment (test or live)
  • Enter your public and private keys

Available display options ​

a. Redirect to a Stancer external page: the user will be automatically redirect to a Stancer page, then once the payment is accepted. redirected back to your website.

b. (Our recommendation) Integrated in the payment page of your site: the payment page is proposed directly on your website.

Available means of payment ​

  • the module allows you to make payments by credit card.
  • the payments are 3D secure compatible. You can modify the sum from which 3D secure will trigger inside the WooCommerce back-office.

Test cards ​

Available test cards