Using ecommpay Simple Pay for Magento CMS

This is the manual for ecommpay Simple Pay plug-in that allows you to integrate the ecommpay payment solutions with your website based on CMS Magento version 2.2 or later. You can use this plug-in to accept payments and issue refunds.

To download the plug-in ecommpay Simple Pay, click here.

Operational scheme

Interaction with ecommpay payment solutions is performed by using a payment page.

Figure: The diagram of payment processing with plug-in enabled

Request for opening the payment page is automatically generated by the plug-in when ecommpay is selected as a payment method.

If the payment is declined, a customer may re-enter the data on the payment page.

Upon receipt of the payment result, a callback is sent to the site's system. The callback is processed by the plug-in automatically. In accordance with the payment result, the status of the order changes to:

  • Pending Payment — payment is declined.
  • Processing — payment is successful.
  • Complete — order is completed.
  • Closed — full refund is successful.
  • Partial Refund — partial refund is successful.


To install a plugin, do the following:

  1. Copy folder with the plugin to the root folder of the project: app/code folder.
  2. Run the following commands from the root folder of the project:
    ./magento indexer:reindex
    php bin/magento cache:clean
    php bin/magento cache:flush
    php bin/magento setup:upgrade


When the plugin is activated, the test mode is used by default. By using this mode, you can get familiar with the operation process of the plugin connected to the site, without an option to perform payments in real time. In the test mode, you may configure and test the plugin, perform test orders and view information about the them.


To configure parameters of the plugin in the test mode, do the following:

  1. Open Magento.
  2. Select STORES > Configuration.

  3. Select SALES > Payment Methods.

  4. Select ecommpay Simple Pay in the additional section OTHER PAYMENT METHODS and configure the required settings. For more details see below.
  5. Make sure, that Yes is selected in the Test mode field.
  6. Click the Save Config button.

Plugin settings include the following parameters:

  • Field Enabled — to display the payment method by using ecommpay payment page on the site.
  • Parameters of ecommpay payment page operation while displaying:
    • Title — a name of the payment method on the site.
    • Description — information about the payment method on the site.
    • Payment page mode — the mode of displaying payment page: as a modal window, as an iframe object embedded into the HTML page, as a separate browser tab.
    • Iframe wrapper — identifier of the HTML element of payment page wrapper where the iframe object is to be displayed. This identifier is used only for displaying payment page in the iframe object.
    • Sort Order — an order number of the payment method displayed in the list of available payment methods on the site.
    • Send customer id — automatic passing of the customer ID (customer_id) parameter in the request for opening the payment page. This option is available only for orders placed by customers signed up to for an account on the website. The customer_id parameter is used for saving payment instrument details. For more information, see Saving customer payment data.
    • Language — a language of the payment page.
    • Currency — a currency of the payment page.
    • Additional parameters — additional parameters of the payment page.

      A list of these parameters is available Parameters for opening payment form. When specifying two or more parameters, they must be entered with "&" as separator.

  • Other parameters of the plugin:
    • New Order Status — status during order confirmation.
    • Fields Payment from Applicable Countries and Payment from Specific Countries for selecting countries, where the payment method is available.
  • Parameters Project ID and Secret key are used for implementing ecommpay payment solutions.

    They are not used in the test mode.

Performing test orders

Once the parameters of the plugin are configured you should perform test orders on the site and check information regarding the orders in Magento in the section Sales > Orders.

Note: In the test mode in order to change order's status from Pending Payment to Processing once you complete a payment, you should click Back to Website button. Otherwise, the order's status remains Pending Payment.

Performing test refunds

Once test orders are performed you should perform test refunds and check information regarding the refunds in Magento in the section Sales > Orders.

To perform refund you need:
  1. Go to the section Sales.
  2. Choose order you want to refund. The order status should be Complete.
  3. Go to the section Invoices inside of choosen order.
  4. Choose invoice.
  5. Click on Credit Memo button.
  6. Choose required parameters for refund.
  7. Click on Refund button.

After refund is performed the order amount should change on the refund amount, also message about performed operation should appear in Credit Memo.

Note: The order status changes to Closed, if full refund is performed. If partial refund is performed, the order status changes to Partial Refund.


Once the plugin is tested using all the planned payment methods it may be switched to production mode. In order to do this, you should receive the parameters for the production mode and adjust settings.

Receiving the parameters for the production mode

To receive the parameters for connecting to ecommpay payment solutions, do the following:

  1. Contact ecommpay technical support and provide the following parameters:
    • The site name and its URL.
    • The payment page currency.
    • URL to receive callbacks (URL, specified in settings, in the field Callback url).

  2. Receive from ecommpay technical support the following parameters:
    • Project ID — site identifier.
    • Secret key — secret key, that is generated for a particular merchant in the ecommpay processing system.

Configuring the operational parameters

In order to set the operational parameters, do the following:

  1. Open Magento.
  2. Go to the section STORES > Configuration > SALES > Payment Methods in the part OTHER PAYMENT METHODS and configure the operational parameters:
    • Make sure, that Yes is selected in the field Enabled.
    • Select No in the field Test mode.
    • Fill in the fields Project ID and Secret key in accordance with the values received from ecommpay technical support.
    • Make sure, that the remaining parameters are set to the required values.
  3. Click the Save Config button.


Once the plugin is launched it operates autonomously.

We recommend that you control orders by reviewing the information in the section Sales > Orders, and also to make sure that order numbers are unique within the site. In the case when an order number duplicates, the payment page does not open and the order's status remains Pending Payment.

If the plugin is already operating in the production mode and you require to switch it back to the test mode, pay attention to how the payment method is displayed on the site. If Yes is select in the fields Enabled and Test mode, the payment method using the ecommpay payment page is displayed on the site. However, all payments are performed as test payments.

Before you switch the plugin back to the production mode, make sure that the Project ID and Secret key fields are filled in accordance with the values received from ecommpay technical support.

If you have any further questions with regards to the plugin operation contact ecommpay technical support by email