Using ECommPay Simple Pay for Magento CMS

This manual describes how to work with plug-in ECommPay Simple Pay version 1.0. The plug-in allows you to perform payments and refunds by using ECommPay payment solutions for sites that are based on CMS Magento version 2.2 or later.

To download the plug-in ECommPay Simple Pay, follow the 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.

Installing

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

Testing

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.

Configuration

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.
    • Popup mode — the way of displaying the payment page in the popup or in the current tab.
    • Sort Order — an order number of the payment method displayed in the list of available payment methods on the site.
    • 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 Payment Page invocation parameters. 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.

Launching

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.

Using

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 support@ecommpay.com