Standard HTTP FORM POST Method is the most common and the fastest way to integrate with 2C2P. The basic HTML code below is automatically generated for you. This HTML code can be embedded into various scripting languages. We have developed ready to use samples.
Code samples
Preparing and Sending Payment Process Request message using HTTP Form Post
<form method=”post” action=”http://demo.2c2p.com/pay/payment.aspx”>
<input type=”text” id=”VERSION” name=”VERSION” value=”4.0″/>
<input type=”text” id=”MERCHANTID” name=”MERCHANTID” value=”100″/>
<input type=”text” id=”PRODUCTINFO” name=”PRODUCTINFO” value=”" />
<input type=”text” id=”INVOICENO” name=”INVOICENO” value=”" />
<input id=”REF1″ name=”REF1″ type=”text” value=”" />
<input id=”REF2″ name=”REF2″ type=”text” value=”"/>
<input id=”REF3″ name=”REF3″ type=”text” value=”"/>
<input type=”text” id=”AMOUNT” name=”AMOUNT” value=”000000010000″/>
<input type=”text” id=”RESULTURL1″ name=”RESULTURL1″ value=”http://….”/>
<input type=”text” id=”RESULTURL2″ name=”RESULTURL2″ value=”http://….”/>
<input type=”Submit” name=”btnSubmit” value=”Submit” id=”Submit1″ />
</form>
After sending the above HTTP Form Post request the merchant will have the following information regarding to the transaction, at merchant’s “POSTURL
RESPONSE=01&APPCODE=051051&INVOICENO=MIC02154950&PAN=9117&EXPDATE=0808&AMOUNT=000000010000
In ASP.Net in C#
string paymentResponse = “”, paymentAppCode = “”, paymentInvoiceNo = “”,
paymentPAN = “”, paymentExpDate = “”, paymentAmt = “”;
paymentResponse = Request.Form[“RESPONSE”];
paymentAppCode = Request.Form[“APPCODE”];
paymentInvoiceNo = Request.Form[“INVOICENO”];
paymentPAN = Request.Form[“PAN”];
paymentExpDate = Request.Form[“EXPDATE”];
paymentAmt = Request.Form[“AMOUNT”];
In Java J2EE
String paymentResponse, paymentAppCode, paymentInvoiceNo, paymentPAN,
paymentExpDate, paymentAmt
paymentResponse = Request.Form(“RESPONSE”);
paymentAppCode = Request.Form(“APPCODE”);
paymentInvoiceNo = Request.Form(“INVOICENO”);
paymentPAN = Request.Form(“PAN”);
paymentExpDate = Request.Form(“EXPDATE”);
paymentAmt = Request.Form(“AMOUNT”);
In PHP
$paymentResponse = “”, $paymentAppCode = “”, $paymentInvoiceNo = “”, $paymentPAN =
“”, paymentExpDate = “”, paymentAmt = “”;
$paymentResponse = _REQUEST[“RESPONSE”];
$paymentAppCode = _REQUEST[“APPCODE”];
$paymentInvoiceNo = _REQUEST[“INVOICENO””];
$paymentPAN = _REQUEST[“RESPONSEPAN”];
$paymentExpDate = _REQUEST[“EXPDATE”];
$paymentAmt = _REQUEST[“RESPONSEAMOUNT”];
For comprehensive merchant integration guide please contact us.

English (UK)
Thai


