protected void Button1_Click(object sender, EventArgs e)
{
//Demo Url Process=https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do?
//Live Url Process= https://www.myvirtualmerchant.com/VirtualMerchant/process.do?
//One transaction will done at a time
Test Card Number:4111111111111111
StringBuilder ob = new StringBuilder();
ob.Append(“https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do?”);
ob.Append(“ssl_merchant_id= Merchant Id”);
ob.Append(“&ssl_amount= Amount”);
ob.Append(“&ssl_user_id=User Id”);
ob.Append(“&ssl_pin=101”);
ob.Append(“&ssl_show_form=false”);
ob.Append(“&ssl_transaction_type=ccsale”);
ob.Append(“&ssl_first_name=abdul”);
ob.Append(“&ssl_last_name=khursheed”);
ob.Append(“&ssl_city=noida”);
ob.Append(“&ssl_country=india”);
ob.Append(“&ssl_avs_address=noida”);
ob.Append(“&ssl_address2=noida”);
ob.Append(“&ssl_email=abc@gmail.in”);
ob.Append(“&ssl_avs_zip=58013”);
ob.Append(“&ssl_cvv2cvc2_indicator=Present”);
ob.Append(“&ssl_cvv2cvc2=Cvv Code”);
ob.Append(“&ssl_description=asadasdsaadsdasadsdassad”);
ob.Append(“&ssl_card_number=Card Number”);
ob.Append(“&ssl_transaction_type=Transaction Type”);
ob.Append(“&ssl_exp_date= Exp Date”);
ob.Append(“&ssl_result_format=HTML”);
ob.Append(“&ssl_receipt_decl_method=REDG”);
//redirect to another page
ob.Append(“&ssl_receipt_decl_get_url=”);
//Reciept Url
ob.Append(“&ssl_receipt_apprvl_method=REDG”);
//Redirect to another page
ob.Append(“&ssl_receipt_apprvl_get_url=”);
string sm = ob.ToString();
WebRequest request = WebRequest.Create(sm);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string ResponseStr = reader.ReadToEnd();
if (ResponseStr.Contains(“Error Code”))
{
Literal1.Text = “Invalid Card”;
}
else
{
Literal1.Text = “Payment Successfully”;
}
}
Its working.
I really appreciate your help, it is very useful for me,you will get good grades!http://www.517cq.com/