Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool method_67(string string_21, string string_22, string string_23, ref string string_24, ref string string_25, ref CookieContainer cookieContainer_1)
- {
- string str;
- string str1;
- string str2;
- string str3;
- bool flag;
- bool flag1;
- bool flag2 = false;
- string_24 = "";
- string_25 = "";
- int num = 90000;
- bool flag3 = false;
- int num1 = 0;
- Label1:
- while (true)
- {
- Label2:
- this.method_46("Enter ProcessSBINetBanking.");
- if (!string_21.Contains("onlinesbi"))
- {
- string_25 = "Some thing went wrong with SBI Payment";
- this.method_46("Html doesn't contains onlinesbi, returning.");
- flag = false;
- break;
- }
- else
- {
- string_24 = "";
- string str4 = "https://www.irctc.co.in/eticketing/jpInput.jsf?cid=1";
- string[] strArrays = string_22.Split(new string[] { "||" }, StringSplitOptions.None);
- string str5 = strArrays[0].Trim();
- string str6 = strArrays[1];
- string str7 = "";
- string str8 = "";
- string str9 = "";
- string str10 = "";
- string str11 = "";
- if ((int)strArrays.Length >= 5)
- {
- str9 = strArrays[3];
- str10 = strArrays[4];
- str11 = strArrays[5];
- }
- if (str11 == "")
- {
- str = "otpMobile";
- }
- else
- {
- str = (str9 != "" ? "otpOffline" : "otpOnline");
- }
- string str12 = Class5.smethod_15(string_21, ref str7, false);
- cookieContainer_1 = null;
- string str13 = "";
- string str14 = "";
- int num2 = 0;
- int num3 = 0;
- if ((int)strArrays.Length > 2)
- {
- str8 = strArrays[2].Trim();
- }
- try
- {
- this.method_46(string.Concat("First Hit : Inp = ", str12));
- if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("First Hit Failed. err = ", str13));
- string_25 = "SBI Not Working - Payment Failed";
- cookieContainer_1 = null;
- flag = false;
- break;
- }
- else
- {
- this.method_46(string.Concat("First Output htm = ", str14));
- if ((string.IsNullOrEmpty(str14.Trim()) ? true : !str14.Contains("username")))
- {
- flag = flag2;
- break;
- }
- else
- {
- string str15 = "QlaUwr5x";
- string str16 = "CRIS_IR2";
- num2 = str14.IndexOf("name=\"keyString");
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- str15 = str14.Substring(num2, num3);
- string str17 = Class5.smethod_24(string.Concat(Class5.smethod_24(string.Concat(str5, "#", str6)), "#", str15));
- Class5.smethod_23(string.Concat(str5, "#", str6));
- string str18 = Class5.smethod_23(string.Concat(Class5.smethod_23(string.Concat(str5, "#", str6)), "#", str15));
- str12 = string.Concat(new string[] { "bankCode=0&merchantCode=", str16, "&keyString=", str15, "&sha2password=", str18, "&loginmode=retail&userName=", str5, "&password=", str17 });
- str4 = str7;
- str7 = "https://merchant.onlinesbi.com/merchant/loginsubmit.htm";
- this.method_46(string.Concat("Second Hit : Inp = ", str12));
- if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("Second Hit Failed. err = ", str13));
- string_25 = "Failed while making Payment. Payment Not Done";
- flag = false;
- break;
- }
- else
- {
- this.method_46(string.Concat("Second Hit Output = ", str14));
- if (str14.Contains("<form action=\"merchantinter.htm\""))
- {
- num2 = str14.IndexOf("selectAccountNo");
- num2 = str14.IndexOf("(", num2) + 1;
- num3 = str14.IndexOf(")", num2) - num2;
- string str19 = str14.Substring(num2, num3).Replace("'", "");
- string[] strArrays1 = str19.Split(new char[] { ',' });
- num2 = str14.IndexOf("setBankSystem");
- num2 = str14.IndexOf("(", num2) + 1;
- num3 = str14.IndexOf(")", num2) - num2;
- string str20 = str14.Substring(num2, num3).Replace("'", "");
- string[] strArrays2 = str20.Split(new char[] { ',' });
- num2 = str14.IndexOf("debit_accountNo");
- if (num2 <= 0)
- {
- str1 = strArrays1[1];
- str2 = strArrays1[3];
- str3 = strArrays1[0];
- }
- else
- {
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- str1 = str14.Substring(num2, num3);
- num2 = str14.IndexOf("debit_branchCode");
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- str2 = str14.Substring(num2, num3);
- num2 = str14.IndexOf("selectedNickName");
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- str3 = str14.Substring(num2, num3);
- }
- num2 = str14.IndexOf("name=\"corpMode");
- num2 = str14.IndexOf("lue=", num2) + 4;
- num3 = str14.IndexOf(">", num2) - num2;
- string str21 = str14.Substring(num2, num3).Replace("'", "").Replace("\"", "").Trim();
- str12 = string.Concat(new string[] { "debitAccountNo=", strArrays1[1], "&debitAccountType=", strArrays1[2], "&debitBranchCode=", strArrays1[3], "&corpMode=", str21, "&dproductDisc=", strArrays2[0], "&dbankSystem=", strArrays2[1], "&vechequeNo=&d=radiobutton&statusCount=1&debit_accountNo=", str1, "&debit_branchCode=", str2, "&selectedNickName=", str3, "&vechequeNo=&validation=--%7CRemarks%7C%7C1%7C&--=Railway+Ticket+Booking&SecurityId=CRIS&RU=https%3A%2F%2Fwww.irctc.co.in%2Feticketing%2FBankResponse&merchstatus=1&amountinwords=&txnPassword=&Submit=Confirm" });
- if (str11.Length > 1)
- {
- str12 = string.Concat(new string[] { "debitAccountNo=", strArrays1[1], "&debitAccountType=", strArrays1[2], "&debitBranchCode=", strArrays1[3], "&corpMode=", str21, "&dproductDisc=", strArrays2[0], "&dbankSystem=", strArrays2[1], "&vechequeNo=&d=radiobutton&statusCount=1&debit_accountNo=", str1, "&debit_branchCode=", str2, "&selectedNickName=", str3, "&vechequeNo=&validation=--%7CRemarks%7C%7C1%7C&--=Railway+Ticket+Booking&merchantName=CRIS_IR2&RU=https%3A%2F%2Fwww.irctc.co.in%2Feticketing%2FBankResponse&merchstatus=1&amountinwords=&txnPassword=&Submit=Confirm" });
- }
- str4 = "https://merchant.onlinesbi.com/merchant/merchantdisplay.htm";
- str7 = "https://merchant.onlinesbi.com/merchant/merchantinter.htm";
- this.method_46(string.Concat("Third Hit Inp = ", str12));
- if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("Third Hit Failed. err = ", str13));
- string_25 = "Failed while making Payment. Payment Not Done";
- flag = false;
- break;
- }
- else
- {
- this.method_46(string.Concat("Third Hit Output = ", str14));
- if (!str14.Contains("Verify and confirm IRCTC"))
- {
- string_25 = "";
- if (str14.Contains("errormsg"))
- {
- num2 = str14.IndexOf("errormsg");
- num2 = str14.IndexOf(">", num2) + 1;
- num3 = str14.IndexOf("<", num2) - num2;
- string_25 = str14.Substring(num2, num3).Trim();
- }
- if (str14.IndexOf("You have exceeded the per day transaction maximum count", StringComparison.CurrentCultureIgnoreCase) > 0)
- {
- string_25 = "You have exceeded the per day transaction maximum count";
- }
- if (string.IsNullOrEmpty(string_25))
- {
- string_25 = "Failed while Processing into SBI";
- }
- this.method_46(string.Concat("Third Hit Failed, Not valid HTML err = ", string_25));
- flag = false;
- break;
- }
- else
- {
- string str22 = "47.90";
- string str23 = "";
- num2 = str14.IndexOf("userType") - 20;
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- string str24 = str14.Substring(num2, num3);
- num2 = str14.IndexOf("transactionName") - 20;
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- string str25 = str14.Substring(num2, num3);
- num2 = str14.IndexOf("creditAmountTransfer");
- num2 = str14.IndexOf("lue=\"", num2) + 5;
- num3 = str14.IndexOf("\"", num2) - num2;
- str23 = str14.Substring(num2, num3);
- str22 = "48.10";
- str12 = string.Concat(new string[] { "merchantCode=", str16, "&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&userType=", str24, "&transactionName=", str25, "&processUrl=merchantconfirm.htm&smsAlert=&doRedirect=Yes" });
- if (str11.Length > 1)
- {
- str12 = string.Concat(new string[] { "merchantCode=", str16, "&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&userType=", str24, "&transactionName=", str25, "&processUrl=merchantconfirm.htm&otpType=", str, "&smartotpflag=Y&creditAmountTransfer=", str22, "&smsAlert=yes&doRedirect=Yes&smartOTP=", str });
- }
- str4 = str7;
- str7 = "https://merchant.onlinesbi.com/merchant/smsenablehighsecurity.htm";
- string str26 = str12 ?? "";
- Thread.Sleep(300);
- Label3:
- this.method_46(string.Concat("Fourth Hit Inp = ", str12));
- if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("Fourth Hit Failed. err = ", str13));
- string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
- if (str13.ToUpper().Contains("INTERNAL SERVER ERROR"))
- {
- if (Class5.bool_0)
- {
- string_25 = "OTP not bypassed in Scorpio";
- }
- else
- {
- string_25 = "OTP not bypassed in Scorpio";
- }
- }
- flag = false;
- break;
- }
- else if (str14.Contains("Sorry, unable to process your request"))
- {
- goto Label1;
- }
- else
- {
- while (true)
- {
- this.method_46(string.Concat("Fourth Hit output = ", str14));
- if (!str14.Contains("High security transaction password"))
- {
- break;
- }
- else
- {
- this.method_46("Loading for OTP");
- str12 = "";
- if (str11.Length > 1)
- {
- Thread.Sleep(150);
- string offlineToken = Class5.getOffline_Token(str9, str11, str14);
- if (offlineToken.Length >= 4)
- {
- str12 = string.Concat("resendFlagValue=&plainotpOffline=&otpType=otpOnline&processUrl=merchantconfirm.htm&securityPassword=", offlineToken);
- str12 = staticm.serial("", str14);
- str12 = staticm.setpost(str12, "securityPassword", offlineToken);
- str12 = str12.Replace("&Button4=Confirm", "");
- str12 = str12.Replace("&Reset=Reset", "");
- }
- else if ((!offlineToken.Contains(":") ? true : flag3))
- {
- str12 = "";
- string_25 = "Unable to get OTP from https://m.onlinesbi.com";
- flag = false;
- flag1 = flag;
- return flag1;
- }
- else
- {
- flag3 = true;
- str12 = str26;
- goto Label3;
- }
- }
- if (str12.Length <= 1)
- {
- frmCaptcha _frmCaptcha = new frmCaptcha(this, cookieContainer_1, "https://merchant.onlinesbi.com/merchant/resendsmsotp.htm", str7);
- Control control0 = this.control_0;
- Rectangle rectangle0 = this.rectangle_0;
- string[] strArrays3 = new string[] { "resendFlagValue=&processUrl=merchantconfirm.htm&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&smsAlert=yes&merchantCode=", str16, "&userType=", str24, "&otpType=&doRedirect=Yes&transactionName=MP&creditAmountTransfer=&smartotpflag=&plainotpOffline=&otpType=&processUrl=merchantconfirm.htm&securityPassword=" };
- _frmCaptcha.method_2(control0, rectangle0, str8, string.Concat(strArrays3), "SBI", str23, string.Concat("Account No: ", strArrays1[1]));
- str12 = (_frmCaptcha.bool_3 ? string.Concat(new string[] { "resendFlagValue=yes&processUrl=merchantconfirm.htm&plainotpOffline=&smsAlert=yes&otpType=&userType=", str24, "&doRedirect=Yes&transactionName=MP&resendFlagValue=&smartotpflag=&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&merchantCode=", str16, "&creditAmountTransfer=&baseURL=&plainotpOffline=&otpType=&processUrl=merchantconfirm.htm&securityPassword=", _frmCaptcha.txtImageData.Text.Trim() }) : string.Concat(new string[] { "resendFlagValue=&processUrl=merchantconfirm.htm&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&smsAlert=&merchantCode=", str16, "&userType=", str24, "&doRedirect=Yes&transactionName=", str25, "&securityPassword=", _frmCaptcha.txtImageData.Text.Trim(), "&Button4=Confirm" }));
- if (_frmCaptcha.DialogResult == DialogResult.OK)
- {
- _frmCaptcha.Dispose();
- }
- else
- {
- _frmCaptcha.Dispose();
- this.method_46("OTP Cancelled by User.");
- string_25 = "OTP Cancelled by User";
- flag = false;
- flag1 = flag;
- return flag1;
- }
- }
- str4 = str7;
- str7 = "https://merchant.onlinesbi.com/merchant/smsenablehighsecurityconfirm.htm";
- this.method_46(string.Concat("High Security Hit Inp = ", str12));
- if (this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("High Security Hit output = ", str14));
- if (str14.Contains("Completed Successfully"))
- {
- break;
- }
- else if (!str14.Contains("High security transaction password"))
- {
- goto Label2;
- }
- else if (num1 >= 3)
- {
- break;
- }
- }
- else
- {
- this.method_46(string.Concat("High Security Hit Failed. err = ", str13));
- string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
- flag = false;
- flag1 = flag;
- return flag1;
- }
- }
- }
- if (!str14.Contains("you will be automatically redirected to the IRCTC"))
- {
- string_25 = "";
- if (str14.Contains("errormsg"))
- {
- num2 = str14.IndexOf("errormsg");
- num2 = str14.IndexOf(">", num2) + 1;
- num3 = str14.IndexOf("<", num2) - num2;
- str13 = str14.Substring(num2, num3).Trim();
- }
- if (string.IsNullOrEmpty(string_25))
- {
- string_25 = "Failed while Processing into SBI, Ticket Not Booked";
- }
- this.method_46(string.Concat("Fourth Hit Failed, Not valid HTML err = ", string_25));
- flag = false;
- break;
- }
- }
- }
- }
- }
- else if (!str14.Contains("you will be automatically redirected to the IRCTC"))
- {
- if (str14.Contains("errormsg"))
- {
- num2 = str14.IndexOf("errormsg");
- num2 = str14.IndexOf(">", num2) + 1;
- num3 = str14.IndexOf("<", num2) - num2;
- string_25 = str14.Substring(num2, num3).Trim();
- }
- if (string.IsNullOrEmpty(string_25))
- {
- string_25 = "Failed while Login into SBI";
- }
- this.method_46(string.Concat("Second Hit, Not valid HTML err = ", string_25));
- cookieContainer_1 = null;
- flag = false;
- break;
- }
- else
- {
- this.method_46("SBIQuickPay, going to fifth hit");
- }
- str12 = "doRedirect=Yes&echequeNo=&merchantCode=&functionType=&viewType=&statusCode=00";
- str4 = str7;
- str7 = "https://merchant.onlinesbi.com/merchant/redirect.htm";
- this.method_46(string.Concat("Fifth Hit Inp = ", str12));
- if (this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
- {
- this.method_46(string.Concat("Fifth Hit Output = ", str14));
- if (str14.Contains("document.redirectForm.submit"))
- {
- string_24 = str14;
- string_25 = str7;
- flag = true;
- break;
- }
- else
- {
- string_25 = "Failed! Payment Done, Ticket Not Booked";
- this.method_46(string.Concat("Fifth Hit Failed, Not valid HTML err = ", string_25));
- flag = false;
- break;
- }
- }
- else
- {
- this.method_46(string.Concat("Fifth Hit Failed. err = ", str13));
- string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
- flag = false;
- break;
- }
- }
- }
- }
- }
- catch (Exception exception)
- {
- this.method_47("ProcessSBINetBanking", exception.Message);
- flag2 = false;
- }
- flag = flag2;
- break;
- }
- }
- flag1 = flag;
- return flag1;
- }
Add Comment
Please, Sign In to add comment