Custom Payment Gateway Architecture

 

The Smith Cart custom payment gateway options allow you to plug in payment gateways that are not currently pre integrated with Smith Cart. 

 

The following diagram shows the basic flow of control when using the Smith Cart custom gateway option to plug in a new payment gateway:

 

 

 

 

 

The following items correspond to the numbers in the diagram above:

 

1. Your site running Smith Cart sends a Pay request to “Your Custom Web Service”.

 

2. Your Custom Web Service receives the request from Smith Cart and does the following:

 

            - Translates the fields posted by Smith Cart to the field names required by the payment gateway.

            - Builds a request to the new payment gateway you want to communicate with.

 

- Sends a request to the payment gateway using the communication mechanism outlined in the payment gateway integration guide.  Most payment gateways use one of the following communication mechanisms to send and receive information:

 

-    Http post with hidden form fields

-    Http post with querystring parameters

-    Soap Xml web service

-    Restful web service

-    Method calls to a DLL provided by the payment gateway

 

3. The payment gateway processes the transaction and responds with an approval or a decline.

 

4. Your Custom Web Service receives the response from the payment gateway and builds the response back to Smith Cart using the response fields that Smith Cart expects to receive. 

 

Please Note:  The box titled “Your Custom Web Service” in the diagram above is a program that you develop and can be in any language you desire (C#, VB, PHP, Java, etc.).  Your custom web service functions as a middle man between Smith Cart and the payment gateway you want to integrate with.

 

The reasons that Smith Cart cannot communicate directly with the new payment gateway and you need to develop your own web service to marshal transactions between Smith Cart and the payment gateway are as follows:

 

- Each payment gateway uses a different communication mechanism (i.e.  http post, soap xml, restful web service, etc.)

 

- Each payment gateway uses different naming conventions for the request and response fields that are send back and forth.