X-Payments:Configure the connection to X-Payments in the Magento 2 store Administrator panel
After configuring the connection to your Magento 2 store in X-Payments, log in to your Magento 2 store Administrator panel and complete setting up the connection on the Magento 2 store end.
The following procedure assumes that:
- Your Magento 2 store has the X-Payments connector extension installed.
- You have an X-Payments account created using https://www.x-payments.com/trial-demo.html
- You have completed configuring the connection to your Magento 2 store in X-Payments.
Complete the following steps:
- Log in to the Administrator panel of your Magento 2 store.
- Go to Stores -> X-Payments Connector:
The Welcome page showing how to connect X-Payments with Magento 2 in three easy steps opens:
- Click on the link "Connect X-Payments with Magento":
This opens the Connection settings section:
- In the details of your Magento 2 online store in the X-Payments back end, copy your X-Payments configuration bundle and paste it into the respective box in your Magento 2 Administrator panel.
- Click Deploy.
In a couple of seconds, the configuration bundle will be deployed, and a success message will be displayed at the top of the page:
- Check the list of payment methods that have been imported from X-Payments. On the screenshot below you can see that a single payment method has been imported - "Authorize.Net":
If you need to import more payment methods, you will have to add them in X-Payments first and use the Re-import payment methods button in the Magento 2 store to import them.
To quickly access the X-Payments page where you can add more payment methods, use the "Add new payment method" link.
At the time of the writing of this article, multiple payment methods can be imported from X-Payments into Magento 2, but only one of them can be enabled and used to accept payments.
- If you look at the details of the payment method "Authorize.Net" we have imported from X-Payments, you will see that it is set to work using the currency "USD".
The currency is set in X-Payments, and should you want to change the currency used, you will want to do that via the payment configuration settings on the X-Payments end, after which you will have to re-import the payment method settings into your Magento 2 store with the Re-import payment methods button.
- After the deployment of the configuration bundle, none of the payment methods imported from X-Payments are active for your Magento 2 store. (Note the unchecked radio button in the first column on the left opposite the payment method name "Authorize.Net". Also note the option "Disable X-Payments payment method" which is currently enabled):
You still need to activate the payment method you wish to use in your Magento 2 store. To activate a payment method, select the radio button in the first column on the left opposite the method name and click Update.
The selected method will be activated, and you will see a success message at the top of the page.
- Go back to the Connection settings section of the Magento 2 Administrator panel to complete the connection.
Here you will need to adjust a few more settings.
You should see that some of the settings on this page have already have been adjusted automatically as a result of the deployment of the X-Payments configuration bundle (like the X-Payments URL or the IP addresses for X-Payments callbacks). The rest of the settings should be checked and adjusted manually. The list of settings available on the Connection settings page is as follows:
- X-Payments URL: URL where X-Payments is installed. This info is received automatically via the X-Payments configuration bundle.
- IP addresses for X-Payments callbacks: IP addresses from which X-Payments callbacks will originate.
Comment: X-Payments will send callback requests to your store from specific IP addresses. To ensure that your store accepts callback requests only from these IP addresses, the allowed IP addresses need to be specified in this field as a comma-separated list. For more info, see Callback from X-Payments to the store.
- Payment method title: This field can be used to set the name for the payment method - as it should be seen by your Magento 2 store users. The name entered into this field will replace the name imported from X-Payments.
- Action (Authorize or Authorize and capture): This setting determines how the buyer's credit card is charged when they pay you via X-Payments:
If this is set to Authorize, a two-step process is used in which the authorization of payment is separated from the capture of the authorized payment. At the time of the initial transaction, you perform only an authorization on the buyer's card without actually capturing the funds. This corresponds to the payment status "Authorized" in X-Payments. Later you need to take additional steps to capture the funds or void the authorization.
If this is set to Authorize and capture, an actual charge is made on the buyer's card as soon as the buyer's payment information is processed by the payment gateway - without any further interaction on your part. In X-Payments the status of such payments appears as "Charged".
Some payment gateways do not support two-step payments with separate authorization and capture, so if you wish to choose the "Authorize" option, make sure your payment gateway supports this feature.
Please be aware that the "Action" setting in your Magento 2 store overrides the "Initial transaction" setting in the respective payment configuration in X-Payments (Setting the "Action" to Authorize in Magento 2 allows you to have a two-step payment process with separate authorization and capture - even if the payment configuration in X-Payments is configured to use the "Auth and capture" mode for the initial transaction.)
- After making changes to the settings in the Connection settings section, be sure to click Update to save them.
That's it. You have connected your Magento 2 store to X-Payments.