Custom Hosted Payment Gateway Web Service

 

The Hosted Custom Payment Gateway Web Service option allows you to plug-in any hosted payment gateway provider you desire.  To configure the “Custom Hosted Web Service” do the following:

 

1.   Go to the Store Admin Menu and click the “Payment Setup” button

 

 

 

 

2.   Click the “Payment Gateways” button on the top menu

 

3.   Select the “Custom Hosted Web Service” from the gateway dropdown list

 

 

 

 

When the “Custom Hosted Web Service” gateway option is selected in the payment gateway setup screen the following required fields are displayed:

 

Merchant ID - Merchant ID is a unique id that identifies you with the gateway provider and is used for authentication.  Merchant ID should be a required field for the gateway. 

 

Password - This is the gateway password and should be a required field.  Used for security authentication. 

 

URL – Enter the URL of the hosted payment gateway you want SmithCart to transfer to when the user checks out in SmithCart and clicks the submit button to make payment.

 

For example:   https://secure.mypaymentform.com/payonline.aspx

 

 

Redirect and Post

 

The SmithCart custom hosted web service gateway option will perform a “Response.Redirect” to the URL that you have configured in the “URL” field and pass the payment parameters as hidden fields in the form post.

 

SmithCart will communicate with the custom hosted payment gateway using a standard https “Request – Response” form post with hidden name value pairs (NVP) fields. 

 

The following are the required fields (parameters) in the request and response between SmithCart and the payment gateway:

 

 

Parameters Posted by SmithCart to the Payment Gateway

 

      merchant_id

      password

      test_mode  -  "1" for test mode.  “0” for live.

      trans_type - "creditcard"

      return_url  - The url that the customer will be redirected to after they process a payment.

      first_name

      last_name

      address1

      address2

      city

      state

      country

      postalcode

      email

      telephone

      company_name

      order_id – SmithCart Order ID

      ship_amount

      tax_amount

      order_total

      product: {id},{name},{quantity},{amount} in json format

 

Example:

 

{product=[{sku:1234, name:ProductABC, quantity:1, amount:100.00}, {sku:2222, name:ProductXYZ, quantity:1, amount:200.00}]}

 

 

 

Transaction Response

 

The Hosted Payment Gateway should redirect buyers back to SmithCart after a successful payment.

 

The Hosted Payment Gateway gets the URL to redirect the buyer to in one of two ways:

 

1.   By using the "redirect_url" parameter passed by SmithCart in the original post redirect

2.   By allowing merchants to configure a URL in there gateway virtual terminal where buyers will be redirected to after a successful payment.

 

SmithCart will accept response parameters posted from the gateway as form variables.

 

Response Parameters SmithCart expects back from the Hosted Payment Gateway

 

      status - "00000" or "Approved" indicates payment success.  Any other value indicates decline.

      payment_type (CreditCard, ACHChecking, ACHSavings)

      auth_code - Authorization code returned from the processor

      trans_id - Transaction ID returned from the processor

      notes - In the case of a declined transaction returns the reason for the decline.

      amount - Amount of the transaction authorized