Credit card processing (.cgi)
-
Hi.. I m implementing credit card processing in my website. The provider has given something like this.
It works fine as pasting it on simple .htm page. When u run this page a button appears, when u click it one by one pages appear for credit card processing. asks for input data of customers, bla.. bla..bla.. I have one button in my customer registration say "Finish"... I want the above process.cgi to run after clicking this button ( from codebehind). And could u tell me How to accomodate the above screens in my iframes or something like this, so that customer can interact with process.cgi and still can view my website... Thanks in advance., You can even give some clues... Hemant
By: Hemant Thaker
-
Hi.. I m implementing credit card processing in my website. The provider has given something like this.
It works fine as pasting it on simple .htm page. When u run this page a button appears, when u click it one by one pages appear for credit card processing. asks for input data of customers, bla.. bla..bla.. I have one button in my customer registration say "Finish"... I want the above process.cgi to run after clicking this button ( from codebehind). And could u tell me How to accomodate the above screens in my iframes or something like this, so that customer can interact with process.cgi and still can view my website... Thanks in advance., You can even give some clues... Hemant
By: Hemant Thaker
Hi, You need to use System.Net name space and HttpWebRequest , HttpWebReqponse classes to post the data and read the Reponse. You can refer this sample article http://www.revenmerchantservices.com/post/2009/05/26/HttpWebRequest-Post-method.aspx[^] Satalaj
-
Hi, You need to use System.Net name space and HttpWebRequest , HttpWebReqponse classes to post the data and read the Reponse. You can refer this sample article http://www.revenmerchantservices.com/post/2009/05/26/HttpWebRequest-Post-method.aspx[^] Satalaj
\\Create A Class using System; using System.Collections.Generic; using System.Text; namespace Shivam { public class RemotePost { private System.Collections.Specialized.NameValueCollection Inputs = new System.Collections.Specialized.NameValueCollection(); public string Url = ""; public string Method = "post"; public string FormName = "form1"; public void Add(string name, string value) { Inputs.Add(name, value); } public void Post() { System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.Write("<html><head>"); System.Web.HttpContext.Current.Response.Write(string.Format("</head><body onload=\"document.{0}.submit()\">", FormName)); System.Web.HttpContext.Current.Response.Write(string.Format("<form name=\"{0}\" method=\"{1}\" action=\"{2}\" >", FormName, Method, Url)); for (int i = 0; i < Inputs.Keys.Count; i++) { System.Web.HttpContext.Current.Response.Write(string.Format("<input name=\"{0}\" type=\"hidden\" value=\"{1}\">", Inputs.Keys[i], Inputs[Inputs.Keys[i]])); } System.Web.HttpContext.Current.Response.Write("</form>"); System.Web.HttpContext.Current.Response.Write("</body></html>"); System.Web.HttpContext.Current.Response.End(); } } } //Class End \\On Button Click Write Following Line of Code \\Change Key Value as well as payment provider Based on ur field RemotePost myremotepost = new RemotePost(); myremotepost.Url = "https://www.myvirtualmerchant.com/VirtualMerchant/process.do"; myremotepost.Add("ssl_amount",ssl_amount.Value); myremotepost.Add("ssl_merchant_id",ssl_merchant_id.Value); myremotepost.Add("ssl_pin",ssl_pin.Value); myremotepost.Add("ssl_show_form",ssl_show_form.Value); myremotepost.Add("ssl_transaction_type", ssl_transaction_type.Value); myremotepost.Add("ssl_result_format", ssl_result_format.Value); myremotepost.Add("ssl_receipt_decl_method", ssl_receipt_decl_method.Value); myremotepost.Add("ssl_receipt_decl_get_url", ssl_receipt_decl_get_url.Value); myremotepost.Add("ssl_receipt_apprvl_method", ssl_receipt_apprvl_method.Value); myremotepost.Add("ssl_receipt_apprvl_get_url", ssl_receipt_apprvl_get_url.Value); myremotepost.Post();