How to use Integrate third party payment gatway using xpayment?

Scenario -1

You have a payment gateway, that needs to send some datas (like total amount, API key etc) to their server and payment gateway will do all necessary things on their server and return back to your store once processing is done with payment data.

How to implement?

  1. Since it needs to redirect to payment gateway with some datas. So first select Integration type is “Redirect/Forward to Payment URL”
  2. Now enter the payment gateway URL where it need to be redirected/forwarded.
  3. Now you will have to enter all data as JSON format into Data(s) section. You can use few placeholders like {orderTotal}, {currency} etc that xpayment will handle accordingly. Xpayment also has a special placeholder {returnURL} that basically a special URL so that you can return to store from payment gateway. Most of the payment gateway, it need to supply return URL into data section OR it can be set on payment gateway control panel. Return URL denotes basically http://YOUR_DOMAIN/index.php?route=extension/payment/xpayment/confirm
  4. Now select return method type that means how your payment gateway will reply back to store. It could be GET or POST or JOSN. Normally it can be found in payment gateway manual.
  5. Finally, you will have to enter a payment successful condition. That means after returning back from Payment gateway to your store, it can be successful or failure transaction. Normally, it can be found in payment gateway manual. Most of the cases, they send some data like success==true or something like that where success is variable name that will available in their response.
  6. Now xpayment will do remaining things what to do. Either it will reject or accept depending on the data.

Scenario -2

You have a payment gateway, that needs to call their provided API URL/endpoint from your store without leaving your store. it may need to provide some data while calling that API URL.

How to implement?

1. Since it needs to call API with some datas. So first select Integration type is “API Call”
2. Now enter the payment gateway API URL that need to be called.
3. Now you will have to enter all data as JSON format into Data(s) section.
4. Now select API response type. It could be GET or POST or JOSN.
5. Finally, you will have to enter a payment successful condition.

Actually it needs some developing knowledge to integrate payment gateway.

Leave a Reply