X-Payments Connector is an add-on module for X-Cart that provides an interface to connect X-Cart to X-Payments, a PA-DSS v 1.2 verified payment application intended for web stores accepting online credit card payments through background payment gateways. X-Payments Connector ensures correct implementation of the following tasks:
- Importing the data on active payment methods from X-Payments to X-Cart;
- Transferring cart and customer details from X-Cart to X-Payments;
- Redirecting the customer from X-Cart to X-Payments and back to X-Cart;
- Synchronizing transaction and order details between X-Payments and X-Cart.
To successfully install and use the X-Payments Connector add-on module, you must have:
- Installed copy of X-Cart v4.3.0 or later;
- Installed copy of X-Payments v 1.0 or later;
- PHP extensions:
- libCurl version >= 7.10;
- OpenSSL extension;
- XML DOM extension (to parse XML data).
Configuring X-Payments Connector
Before you can start using X-Cart together with X-Payments, you must configure X-Payments Connector.
To configure X-Payments Connector:
1. Log in to the X-Cart Admin area.
2. Go to the Modules section (Administration menu -> Modules).
3. If not selected, select the check box for X-Payments Connector and click Update. This will activate the module.
4. Click on the Configure link for X-Payments Connector.
This will open the X-Payments Connector configuration page.
5. Define connection details.
- Copy the value of the Configuration bundle field from the X-Payments' Online Store Details page, paste the string here and click Deploy. All the connection settings will be automatically specified.
The latest versions of X-Payments Connector can automatically get connection settings from the settings of the store. In the older versions, the values are to be specified manually.
- Store ID: Unique value generated in the X-Payments back-end for a particular store. This value allows X-Payments to correctly identify requests coming from this store.
- X-Payment URL: The URL of your X-Payments installation. Make sure the URL is specified correctly, otherwise the module will not be able to connect to X-Payments.
- Encryption key: A key to encrypt requests that the store sends to X-Payments. The key is generated in the X-Payments back-end.
- Decryption key: A key to decrypt responses and callback requests that the store receives from X-Payments. The key is generated in the X-Payments back-end.
- Decryption key password: A password to decrypt the Decryption key. The password is generated in X-Payments back-office.
- IP addresses for X-Payments callbacks: A comma-separated list of X-Payments IP addresses that are used by X-Payments to send callback requests.
6. Establish mapping rules.
Mapping rules are used to synchronize transaction statuses in X-Payments with statuses of respective X-Cart orders. To associate an X-Payments transaction status with an X-Cart order status, choose the order status from the drop-down box in the column on the right.
For example, if you associate the entry "Set order status for 'Charged' payment to" on the right with the value "Processed" from the drop-down box on the left, changing the status of an X-Payment transaction to "Charged" will automatically change the status of the respective order in X-Cart to "Processed".
7. Click the Save button.
Making a test transaction
To test the module settings and connection with X-Payments click the Test module button. If the module is configured properly, a 'Test transaction successfully completed' message is displayed at the top of the page.
Importing X-Payments payment methods into X-Cart
To be able to use the payment methods defined in X-Payments you should import information about them from X-Payments.
First click the Request payment methods from X-Payments button, and X-Payments will return a list of payment methods available for this shopping cart.
After you have reviewed the list of available payment methods, click Import payment methods and proceed with the next step - adding and enabling X-Payments payment methods in X-Cart admin area.
Adding and enabling X-Payments payment methods in X-Cart
To be able to use X-Payments payment methods, you need to add and enable them in X-Cart admin area.
- In the Admin area of your X-Cart store, go to the Payment methods page (Settings->Payment methods).
- On the Payment methods page, click the Payment gateways tab to open the section where you select payment gateways:
- Use this section to select the payment methods you have configured in X-Payments:
First, choose your country of business from the Your country box to ensure that you see only payment gateways available for you country:
Then, choose the method you have imported from X-Payments from the list in the Payment gateways selector:
- Click Add. The payment method will be added.
Now, if you click the Payment methods tab, you will be able to see the newly added payment method in the Payment methods section:
You can check its configuration by clicking the Configure link opposite its name.
Note that for X-Payments payment methods it is not possible to change the configuration using X-Cart's user interface. Should you need to change anything, you will have to make the changes in X-Payments and then import and add the method in X-Cart again.
After the payment method has been added, you need to enable it:
- Locate the payment method you have added in the list of payment methods. You may need to scroll down the form because new methods are added to the end of the list.
- Select the check box to the left of the payment method name.
- Click Apply changes. The payment method will be activated.
You can edit or delete the added X-Payments payment method like any other payment methods in X-Cart.
Enabling lite interface (iFrame support for One-Step-Checkout)
X-Payments connector in X-Cart since v4.5.2 supports loading credit card from from X-Payments via iFrame (aka "lite interface"). Using "lite interface" you can remove a step for entering credit cards in your checkout routine. For your customers it will look like they enter credit card details within your regular checkout routine.
See how it works and how to enable it.