These docs are for v4.0.2. Click to read the latest docs for v4.3.0.

Magento 2

Preparation


To integrate the 2C2P payment gateway with Magento, you will need a sandbox account or a test account.

🚧

Support for Magento 2 Framework
version 2.2.x
version 2.3.x
version 2.4.x

Installation


  1. Download the 2C2P module files here.
  2. Unzip the downloaded files.
  3. Copy the files to a directory under your Magento application.

Configuration


To run Magento-2 commands, make sure that:

  • PHP Dependency Manager - Composer is installed on your machine.
  • The 2C2P module files have been copied to the correct directory
  1. Access the command prompt as an administrator.
  2. Go to your Magento-2 installation directory and run the following command: php bin/magento setup:upgrade
977
  1. In your Magento settings, go to System > Cache Management
294
  1. Use the Select All option
1295
  1. Click on Flush Magento Cache, and then select Flush Cache Storage.

  2. Go to Stores > Configuration

262
  1. Select Sales > Payment Methods from the sidebar.
302

To enable the 2C2P module and configure the different attributes, refer to the guide below.

736

Reference

Name Description Comment
Enable/StatusEnable or disable the moduleIf disabled, the 2C2P payment option will not appear on your checkout page.
TitleTitle to be displayed for the 2C2P payment option.Sets the title to be displayed at the checkout page.
Merchant IDMerchant ID provided by 2C2PThis can be found in the my2C2P portal.
Secret KeySecret Key for authenticationThis can be found in the my2C2P portal.
ModeSelect the module modeFor testing, choose Sandbox. For live usage, choose Production.
Stored Card PaymentEnable or disable stored card paymentsTick the checkbox to allow storage of card details for subsequent payments
123 Payment ExpirySet the payment slip validity for the 123 alternative payment method.The unit is in hours, and must be a value between 8 - 720.
LanguageSelect the language for the payment gateway.The default language is English.

Interface


After enabling the module, 2C2P will be one of the payment options available for customers. If stored card payments have been enabled, customers will also be able to select any cards they have previously stored.

758

To proceed with payment, customers will be redirected to 2C2P's payment page. If stored card payments have been enabled, customers will also see the option to save their card for future transactions.

607

The payment results page will be displayed after a completed transaction.

702