Card Payment Gateway (Redirect-Host)
To pass the parameters, we accept both POST method and GET method. You may use any of POST or GET.
Method | POST or GET |
Function | Accept Check or Credit card payment online from the customers |
Remark | 10 mandatory parameters, the others are all optional |
Important - Website API Token and Website Id is required for all the web/curling based integration, if you are using any shopping cart which we do support in plugins or you may have your own shopping cart which we do not support. In both the cases, you need to pass one Website API Token and Website Id that can be used for all your products. Our API has the capability to receive any price from the Website API Token and Website Id. You may pass the dynamic 'price' parameter (i.e. price) to us by using the same Website Id.
Parameter | Description |
---|---|
api_token (required) | Website API Token is a string value. |
website_id (required) | Website Id is very important parameter. |
cardsend (required) | cardsend, a string for default (fixed) value CHECKOUT. |
client_ip (required) | Client IP a php code dynamic get IP value <?php echo ($_SERVER['HTTP_X_FORWARDED_FOR']? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);?>. |
action (required) | action, a string for default (fixed) value product. |
source (required) | source, a string for default (fixed) value Host-Redirect-Card-Payment (Core PHP). |
source_url (required) | source_url, Product or Service url of source_url as per your domain - a string for default (fixed) value isset($_SERVER["HTTPS"]) ? 'https://':'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']. |
price (required) | Order Amount, currency format in decimal(10.0.0) |
curr (required) | Currency name of Order Amount, should be string |
product_name (required) | Product Name |
fullname (required) | Customer full name |
email (required) | Customer billing email |
bill_street_1 (required) | Customer's shipping street |
bill_street_2 (required) | Customer's shipping street 2 |
bill_city (required) | Customer's shipping city |
bill_state (required) | Customer's shipping state |
bill_country (required) | Customer's shipping country |
bill_zip (required) | Customer's shipping zip code |
bill_phone (required) | Customer billing phone |
id_order (optional) | Merchant’s order ID that will be returned back in a callback. |
notify_url (optional) | Synchronous notification URL, you can find it in the response data. |
success_url (optional) | Redirect url of success as per your domain |
error_url (optional) | Redirect url of error as per your domain |
Encrypted Payment Gateway (Redirect-Host)
You need to add one additional parameter for Encrypted Payment Gateway
Website Secret Key (required) | Website Secret Key is a string value. |
Example of Card Payment Gateway (Redirect-Host):
<form method="
post
" action="
**********
" name="
paymentform
"/>
<!--Replace of 2 very important parameters * your Website API Token and Website ID-->
<input type=
"hidden"
name=
"api_token"
value=
"************"
/>
<input type=
"hidden"
name=
"website_id"
value=
"***"
/>
<!--default (fixed) value * default-->
<input type=
"hidden"
name=
"cardsend"
value=
"CHECKOUT"
/>
<input type=
"hidden"
name=
"client_ip"
value=
"<?php echo ($_SERVER['HTTP_X_FORWARDED_FOR']?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']);?>"
/>
<input type=
"hidden"
name=
"action"
value=
"product"
/>
<input type=
"hidden"
name=
"source"
value=
"Host-Redirect-Card-Payment (Core PHP)"
/>
<input type=
"hidden"
name=
"source_url"
value=
"<?php echo (isset($_SERVER["HTTPS"])?'https://':'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);?>"
/>
<!--product price and product name * by cart total amount-->
<input type=
"hidden"
name=
"price"
value=
"10.00"
/>
<input type=
"hidden"
name=
"curr"
value=
"USD"
/>
<input type=
"hidden"
name=
"product_name"
value=
"Testing Product"
/>
<!--billing details of .* customer-->
<input type=
"hidden"
name=
"fullname"
value=
"Test Full Name"
/>
<input type=
"hidden"
name=
"email"
value=
"test.2440@test.com"
/>
<input type=
"hidden"
name=
"bill_street_1"
value=
"25A Alpha"
/>
<input type=
"hidden"
name=
"bill_street_2"
value=
"tagore lane"
/>
<input type=
"hidden"
name=
"bill_city"
value=
"Jurong"
/>
<input type=
"hidden"
name=
"bill_state"
value=
"Singapore"
/>
<input type=
"hidden"
name=
"bill_country"
value=
"Singapore"
/>
<input type=
"hidden"
name=
"bill_zip"
value=
"787602"
/>
<input type=
"hidden"
name=
"bill_phone"
value=
"+65 62200944"
/>
<input type=
"hidden"
name=
"id_order"
value=
"2017013120170131"
/>
<input type=
"hidden"
name=
"notify_url"
value=
"https://yourdomain.com/notify.php"
/>
<input type=
"hidden"
name=
"success_url"
value=
"https://yourdomain.com/success.php"
/>
<input type=
"hidden"
name=
"error_url"
value=
"https://yourdomain.com/failed.php"
/>
<input type=
"submit"
name=
"submit"
value=
"SUBMIT"
/>
<script>
document.paymentform.submit();
</script>
|
Test Card Number
Credit Card Type | Credit Card Number | Expiry Month | Expiry Year | CVV |
---|---|---|---|---|
MasterCard | 5555555555554444 | 01 | 30 | 123 |
Visa | 4242424242424242 | 01 | 30 | 123 |