I am newer to payment gateway.I am posting some values to payment gateway site .I send request in html tags.and how to trigger submit button in skipjack site.Any one can help me.I shown my coding below.I am also waiting for your reply.
ButtonClick()
{
toPost += string.Format("<form id='SampleAuthorizationApi' name='SampleAuthorizationApi' method='POST' action='{0}'>", "https://developer.skipjackic.com/scripts/EvolvCC.dll?AuthorizeAPI");
toPost += string.Format("<input type='text' name='serialnumber' value='{0}' />", "000009584792");
toPost += string.Format("<input type='text' name='developerserialnumber' value='{0}' />", "123456123456");
toPost += string.Format("<input type='text' name='sjname' value='{0}' />", "John Doe");
toPost += string.Format("<input type='text' name='streetaddress' value='{0}' />", "123 Demo Street");
toPost += string.Format("<input type='text' name='city' value='{0}' />", "Cincinnati");
toPost += string.Format("<input type='text' name='state' value='{0}' />", "OH");
toPost += string.Format("<input type='text' name='zipcode' value='{0}' />", "12345");
toPost += string.Format("<input type='text' name='shiptophone' value='{0}'>", "9024319977");
toPost += string.Format("<input type='text' name='email' value='{0}' />", "test@test.com");
toPost += string.Format("<input type='text' name='ordernumber' value='{0}' />", "F482E6M5LCBQA79F891Z");
toPost += string.Format("<input type='text' name='orderstring' value='{0}' />", "1~Sample Order~1.00~1~N~||");
toPost += string.Format("<input type='text' name='transactionamount' value='{0}' />", "1.00");
toPost += string.Format("<input type='text' name='accountnumber' value='{0}' />", "4111111111111111");
toPost += string.Format("<input type='text' name='month' value='{0}' />", "08");
toPost += string.Format("<input type='text' name='year' value='{0}' />", "11");
toPost += string.Format("<input type='submit' name='SubmitButton' title='Process Transaction' value='Process Transaction' />");
string sample = "SampleAuthorizationApi";
string str = _GetPayPalPostJS(sample);
toPost += string.Format(str);
WebRequest request = WebRequest.Create("https://developer.skipjackic.com/scripts/EvolvCC.dll?AuthorizeAPI");
// Set the Method property of the request to POST.
request.Method = "post";
// Create POST data and convert it to a byte array.
string postData = toPost;
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
// Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded";
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
using (StreamWriter objStreamWriter = new StreamWriter(request.GetRequestStream()))
{
objStreamWriter.Write(postData);
objStreamWriter.Close();
}
WebResponse objWebResponse = request.GetResponse();
Response.Write(((HttpWebResponse)objWebResponse).StatusDescription);
// Retrieve result parameter.
using (StreamReader objStreamReader = new StreamReader(objWebResponse.GetResponseStream()))
{
string strResponse = objStreamReader.ReadToEnd();
//string testresponse="+""AUTHCODE"",""szSerialNumber"",""szTransactionAmount"",""szAuthorizationDeclinedMessage"",""szAVSResponseCode"",""szAVSResponseMessage"",""szOrderNumber"",""szAuthorizationResponseCode"",""szIsApproved"",""szCVV2ResponseCode"",""szCVV2ResponseMessage"",""szReturnCode"",""szTransactionFileName"",""szCAVVResponseCode"", ""000067"",""999888777666"",""1900"","""",""N"",""Card authorized, exact address match with 5 digit zipcode."",""1"",""000067"",""1"","""","""",""1"", ""10138083786558.009"","""""+';
Response.Write(strResponse);
objStreamReader.Close();
}
}
public string _GetPayPalPostJS(String strFormId)
{
StringBuilder strScript = new StringBuilder();
strScript.Append("<script language='javascript'>");
strScript.Append("var ctlForm = document.forms.namedItem('{0}');");
strScript.Append("ctlForm.SubmitButton();");
strScript.Append("</script>");
return string.Format(strScript.ToString(), strFormId);
}
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Saravanan.Pa...
Member
135 Points
99 Posts
Skipjack Payment gateway submit button problem while posting HttpRequest
Apr 02, 2010 11:24 AM|LINK
Hi to all,
I am newer to payment gateway.I am posting some values to payment gateway site .I send request in html tags.and how to trigger submit button in skipjack site.Any one can help me.I shown my coding below.I am also waiting for your reply.
ButtonClick()
{
toPost += string.Format("<form id='SampleAuthorizationApi' name='SampleAuthorizationApi' method='POST' action='{0}'>", "https://developer.skipjackic.com/scripts/EvolvCC.dll?AuthorizeAPI"); toPost += string.Format("<input type='text' name='serialnumber' value='{0}' />", "000009584792"); toPost += string.Format("<input type='text' name='developerserialnumber' value='{0}' />", "123456123456"); toPost += string.Format("<input type='text' name='sjname' value='{0}' />", "John Doe"); toPost += string.Format("<input type='text' name='streetaddress' value='{0}' />", "123 Demo Street"); toPost += string.Format("<input type='text' name='city' value='{0}' />", "Cincinnati"); toPost += string.Format("<input type='text' name='state' value='{0}' />", "OH"); toPost += string.Format("<input type='text' name='zipcode' value='{0}' />", "12345"); toPost += string.Format("<input type='text' name='shiptophone' value='{0}'>", "9024319977"); toPost += string.Format("<input type='text' name='email' value='{0}' />", "test@test.com"); toPost += string.Format("<input type='text' name='ordernumber' value='{0}' />", "F482E6M5LCBQA79F891Z"); toPost += string.Format("<input type='text' name='orderstring' value='{0}' />", "1~Sample Order~1.00~1~N~||"); toPost += string.Format("<input type='text' name='transactionamount' value='{0}' />", "1.00"); toPost += string.Format("<input type='text' name='accountnumber' value='{0}' />", "4111111111111111"); toPost += string.Format("<input type='text' name='month' value='{0}' />", "08"); toPost += string.Format("<input type='text' name='year' value='{0}' />", "11"); toPost += string.Format("<input type='submit' name='SubmitButton' title='Process Transaction' value='Process Transaction' />"); string sample = "SampleAuthorizationApi"; string str = _GetPayPalPostJS(sample); toPost += string.Format(str); WebRequest request = WebRequest.Create("https://developer.skipjackic.com/scripts/EvolvCC.dll?AuthorizeAPI"); // Set the Method property of the request to POST. request.Method = "post"; // Create POST data and convert it to a byte array. string postData = toPost; byte[] byteArray = Encoding.UTF8.GetBytes(postData); // Set the ContentType property of the WebRequest. request.ContentType = "application/x-www-form-urlencoded"; // Set the ContentLength property of the WebRequest. request.ContentLength = byteArray.Length; using (StreamWriter objStreamWriter = new StreamWriter(request.GetRequestStream())) { objStreamWriter.Write(postData); objStreamWriter.Close(); } WebResponse objWebResponse = request.GetResponse(); Response.Write(((HttpWebResponse)objWebResponse).StatusDescription); // Retrieve result parameter. using (StreamReader objStreamReader = new StreamReader(objWebResponse.GetResponseStream())) { string strResponse = objStreamReader.ReadToEnd(); //string testresponse="+""AUTHCODE"",""szSerialNumber"",""szTransactionAmount"",""szAuthorizationDeclinedMessage"",""szAVSResponseCode"",""szAVSResponseMessage"",""szOrderNumber"",""szAuthorizationResponseCode"",""szIsApproved"",""szCVV2ResponseCode"",""szCVV2ResponseMessage"",""szReturnCode"",""szTransactionFileName"",""szCAVVResponseCode"", ""000067"",""999888777666"",""1900"","""",""N"",""Card authorized, exact address match with 5 digit zipcode."",""1"",""000067"",""1"","""","""",""1"", ""10138083786558.009"","""""+'; Response.Write(strResponse); objStreamReader.Close(); } } public string _GetPayPalPostJS(String strFormId) { StringBuilder strScript = new StringBuilder(); strScript.Append("<script language='javascript'>"); strScript.Append("var ctlForm = document.forms.namedItem('{0}');"); strScript.Append("ctlForm.SubmitButton();"); strScript.Append("</script>"); return string.Format(strScript.ToString(), strFormId); }Thanks for reply,
With Regards,
Saravanan.P
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: Skipjack Payment gateway submit button problem while posting HttpRequest
Apr 02, 2010 05:01 PM|LINK
Hi,
are u Posting Directly Or server tot Serverr Hit..
if Doing Posting DIRECT Then..
toPost = toPost + ...<Your All Code >...
toPost = toPost + "<script lang=javascript> document.form[0].submit();";
labe1.tex= topost
Or
Response.Write(toPost);
oR
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.proxy.aspx?PHPSESSID=tn8k5...
http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.aspx
chk the above link
OR
You have to override Https//
http://www.koders.com/default.aspx?s=httpwebrequest&la=C%23&p=6
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
TATWORTH
All-Star
72405 Points
14018 Posts
MVP
Re: Skipjack Payment gateway submit button problem while posting HttpRequest
Apr 21, 2010 06:57 AM|LINK
I suggest that you ask on the Manufacturer's forum.
Try http://www.oscmax.com/forums/geotrust-qp/21489-skipjack-geotrust-payment-module-help.html
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239