Randomrandom1 = new Random();
BankMellat.PaymentGatewayImplService obj = newBankMellat.PaymentGatewayImplService();
obj.AllowAutoRedirect = true;
longterminalId = 123;
Session["terminalId"]=terminalId ;
stringuserName = "phj";
Session["userName"]= userName;
stringuserPassword="p";
Session["userPassword"]= userPassword;
longorderId=random1.Next(10,10000000);
Session["orderId"]=orderId;
longamount = 50000;
Session["amount"]= amount;
stringlocalDate="20120609";
Session["localDate"]=localDate;
stringlocalTime="082732";
Session["localTime"]=localTime;
stringadditionalData = "پردازشهوشمندجهانی";
Session["additionalData"]= additionalData;
stringcallBackUrl = "http://phj.ir/Epayment/pardakht/request.aspx";
Session["callBackUrl"]= callBackUrl;
longpayerId = 0;
Session["payerId"]= payerId;
// long subServiceId = 0;
//Session["subServiceId"] = subServiceId;
string s1=
obj.bpPayRequest(terminalId, userName,userPassword, orderId, amount, localDate, localTime,
additionalData,
callBackUrl, payerId);
// Response.Redirect("https://pgw.bpm.bankmellat.ir/pgwchannel/startpay.mellat");
TextBoxName.Text = s1;
char[] sep = {','};
string[] refrences = s1.Split(sep);
Session["RefId"] =refrences[1];
HttpWebRequest request =
(HttpWebRequest)WebRequest.Create("https://pgw.bpm.bankmellat.ir/pgwchannel/startpay.mellat");
string text = "?"+"RefId=" + refrences[1]; //string text = "?RefId=" + refrences[1];
byte[] textArray = Encoding.UTF8.GetBytes(text);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = textArray.Length;
request.GetRequestStream().Write(textArray, 0, textArray.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
stringresult = reader.ReadToEnd();
این تمام سورس بنده برای اتصال به بانک است فقط نمی توانم صفحه را ارجاع کنم وقتی ارجاع می کنم خطا در وردی اطلاعات لطف کنید برای بنده اصلاح کنید و اگر نمونه کد هم دارید بهم ایمیل بزنید
iiprocessco@gmail.com