Category Archives: OCMod

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.

Category rules in details in xshippingpro

There are total seven category rules in xshippingpro. These are:

  1. For any categories
  2. Must have selected categories
  3. Must have selected categories with other
  4. Any of the selected categories
  5. Any of the selected categories with others
  6. Except the selected categories
  7. Except the selected categories with others

1. For any categories

This is the default category rule of a method created by xshippingpro.  This rule simply means that there will be no category rule imposed for the method. So the respective method will be available for all the categories

2. Must have selected categories

All chosen categories must be present in the shopping cart and non-chosen  categories (Other categories those did not choose for this method) are not permitted. For example,  you have chosen category A, B, and C for a method. So a customer must be purchased products from all three categories A, B and C for getting this delivery method. Also he is not permitted to choose product from other category like category D. In short –

         Shopping cart categories should be a complete/equal set of the Ruled/choosen categories

3. Must have selected categories with others

All chosen categories must be present in the shopping cart for appearing the method during checking.  If any of the chosen categories (Rule categories) do not present/purchase in the shopping cart, the delivery/shipping method will not be appeared during checkout. Other categories might have been in the shopping cart that does not matter. For example,  you have chosen category A, B, and C for a method. Now a customer purchase products from all those categories A, B, and C. So this method will be appeared during checkout. This customer might be chosen products from other categories as well for example, Category D with those categories (A,B,C), that does not matter. Main condition is that someone must be chosen products from all categories A, B, and C.  In short –

          Rule categories should be a sub-set of the shopping cart categories

4. Any of the selected categories

At least one of the rules categories should be present in the shopping cart and non-chosen categories are not permitted. For example,  you have chosen category A, B, and C for a method. Now a customer purchase products from the category A. So This method will be appeared during checkout. But now if customer choose product from Category D along with category (A), that method will not be appeared. Main condition is someone must be choosen products from  any of the rule categories A, B, and C.  and other categories (non-ruled categories) are not allowed in the shopping cart. In short –

         Shopping cart categories should be a sub-set of the Ruled/choosen categories

 

5. Any of the selected categories with others

At least one of the chosen categories must be present in the shopping cart for appearing this method during checking. Other products from different categories might be purchased, that does not matter. For example,  you have chosen category A, B, and C for a method. Now a customer purchase products from the category A. So this method will be appeared during checkout. This customer might be purchased products from other categories as well for example, Category D that does not matter. Main condition is someone must be choosen at least one  product from  any of the rule categories A, B, and C.  In short –

         Shopping cart categories should be intersected with Ruled/choosen categories

6. Except the selected categories

All chosen categories must be not present in the shopping cart. For example,  you have chosen category A, B, and C for a method. So a customer is not permitted to purchase products from those categories A, B and C for getting this as a shipping method. In short –

         Shopping cart categories should not be a sub-set of the Ruled/chosen categories

7. Except the selected categories with other

It is an interesting rule.  It is same as Except the selected categories but it allows other categories as well.  For example,  you have chosen category A, B, and C for a method.  Now a customer purchase a product from category A. So shipping method will not appeared as expected. Then customer purchase another product from other category D, Now the shipping method will  be appeared. In short –

         Shopping cart categories should be a sub-set of the Rule categories and any other non-chosen category must be present