Category Archives: Xpayment

How to integrate Web Money in X-Payment

You can integrate Web money in xpayment in following ways:

  1. Create a new payment method in x-payment
  2. On the General setting, Choose your Order status that you want to apply when the purchase is successful.
  3. On the integration tab, Select Integration Type “Redirect/Forward to Payment URL
  4. Enter URL to redirect is: https://merchant.wmtransfer.com/lmi/payment_utf.asp
  5. Select Method Type: POST
  6. On the Data(s) field, enter following JSON data and adjust your LMI_PAYEE_PURSE accordingly.
{
    "LMI_PAYEE_PURSE" : "ADD_YOUR_PAYEE_PURSE",
    "LMI_PAYMENT_DESC" : "Payment to {storeName}",
    "LMI_PAYMENT_NO" : "{orderId}",
    "LMI_PAYMER_EMAIL": "{email}",
    "LMI_PAYMENT_AMOUNT" : "{orderTotal}",
    "LMI_SUCCESS_URL" : "{returnURL}",
    "LMI_FAIL_URL": "{storeUrl}index.php?route=checkout/checkout",
    "LMI_SUCCESS_METHOD" : "POST"
}

7. On the Payment success condition field, enter the following condition:

LMI_PAYMENT_NO != ''
Complete Integration example of webmoney in X-payment

8. Please download this ocmod and install it through the extension installer and refresh your ocmod list. This is needed as WebMoney does not return to the success page properly.

How to integrate Perfect money in X-Payment

You can integrate Perfect money in xpayment in following ways:

  1. Create a new payment method in x-payment
  2. On the General setting, Choose your Order status that you want to apply when the purchase is successful.
  3. On the Criteria setting Tab, uncheck the checkbox “For any” of the option Currency Rule. Now choose your applicable currency. This is needed as Perfect Money is not available to all currencies.

4. On the integration tab, Select Integration Type “Redirect/Forward to Payment URL

5. Enter URL to redirect is: https://perfectmoney.is/api/step1.asp

6. Select Method Type: POST

7. On the Data(s) field, enter following JSON data and adjust your PAYEE_ACCOUNT accordingly.

{
    "PAYEE_ACCOUNT" : "U17290487",
     "PAYEE_NAME" : "{storeName}",
    "PAYMENT_ID" : "{orderId}",
    "PAYMENT_AMOUNT" : "{orderTotal}",
    "PAYMENT_UNITS" : "{currencyCode}",
    "PAYMENT_URL" : "{returnURL}",
    "NOPAYMENT_URL": "{storeUrl}index.php?route=checkout/checkout",
    "PAYMENT_URL_METHOD" : "POST",
    "NOPAYMENT_URL_METHOD" : "LINK"
}

8. On the Payment success condition field, enter the following condition:

PAYMENT_ID != ''
Full Integration Example of perfect money in X-Payment

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.