Guest User

CASE IDBIPAYTM

a guest
May 25th, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 14.01 KB | None | 0 0
  1.  
  2. // k
  3. private bool ae(string A_1, string A_2, ref string A_3, ref string A_4)
  4. {
  5.    int result = 0;
  6.    A_3 = "";
  7.    A_4 = "";
  8.    this.kc("Enter ProcessIDBIPayTM.  DETAILS: " + A_2);
  9.    byte[] array;
  10.    if (!A_1.Contains("paytm"))
  11.    {
  12.        array = new byte[169];
  13.        array[161] = 217;
  14.        string arg_6C_1 = "Some thing went wrong with Credit Card Payment";
  15.        array[160] = 75;
  16.        A_4 = arg_6C_1;
  17.        array[100] = 60;
  18.        string text = "\u0015ÊÖD\u008bq\u0001ÆR0\u0089\u001dG\n´\u008ct\u000f»Í\u001cM!ÎÍÝ\u009b \0\0\0ÖÅ\u001eªKéÆeÑÉp\u008eDÞ\u0019WÖ\"\n*UL\u001c×";
  19.        for (int i = 0; i < text.Length; i++)
  20.        {
  21.            array[i + 101] = (byte)text[i];
  22.        }
  23.        array[162] = 253;
  24.        array[99] = 72;
  25.        array[159] = 32;
  26.        array[163] = 45;
  27.        string arg_E4_1 = "Html doesn't contains paytm, returning.";
  28.        array[157] = 153;
  29.        this.kc(arg_E4_1);
  30.        array[156] = 198;
  31.        bool arg_123_0 = false;
  32.        array[158] = 222;
  33.        array[96] = 195;
  34.        array[97] = 17;
  35.        array[98] = 86;
  36.        IRComm.d = array;
  37.        return arg_123_0;
  38.    }
  39.    array = new byte[363];
  40.    array[149] = 34;
  41.    A_3 = "";
  42.    array[158] = 222;
  43.    object arg_164_0 = k.bd;
  44.    array[100] = 60;
  45.    array[104] = 68;
  46.    object a_ = arg_164_0;
  47.    object obj = new string[1];
  48.    object arg_18B_0 = obj;
  49.    array[102] = 202;
  50.    int arg_18B_1 = 0;
  51.    string arg_18B_2 = "||";
  52.    array[97] = 17;
  53.    arg_18B_0[arg_18B_1] = arg_18B_2;
  54.    object obj2 = A_2.Split(obj, StringSplitOptions.None);
  55.    string text2 = "*UL\u001c×";
  56.    for (int j = 0; j < text2.Length; j++)
  57.    {
  58.        array[j + 151] = (byte)text2[j];
  59.    }
  60.    object arg_1DB_0 = obj2[0].Trim();
  61.    array[101] = 21;
  62.    object obj3 = arg_1DB_0;
  63.    string text3 = "\u008bq\u0001ÆR0\u0089\u001dG\n´\u008ct\u000f»Í\u001cM!ÎÍÝ\u009b \0\0\0ÖÅ\u001eªKéÆeÑÉp\u008eDÞ\u0019WÖ";
  64.    for (int k = 0; k < text3.Length; k++)
  65.    {
  66.        array[k + 105] = (byte)text3[k];
  67.    }
  68.    object str = obj2[1];
  69.    object arg_229_0 = obj2;
  70.    array[103] = 214;
  71.    int arg_229_1 = 2;
  72.    array[156] = 198;
  73.    object str2 = arg_229_0[arg_229_1];
  74.    object obj4 = "";
  75.    array[150] = 10;
  76.    array[99] = 72;
  77.    object arg_25D_0 = k.vd(A_1, ref obj4, false);
  78.    array[157] = 153;
  79.    object obj5 = arg_25D_0;
  80.    array[159] = 32;
  81.    object str3 = "";
  82.    object obj6 = "";
  83.    int num = 60000;
  84.    int arg_28F_0 = 0;
  85.    array[96] = 195;
  86.    int num2 = arg_28F_0;
  87.    try
  88.    {
  89.        while (true)
  90.        {
  91.            array[149] = 34;
  92.            array[161] = 217;
  93.            array[160] = 75;
  94.            array[162] = 253;
  95.            array[163] = 45;
  96.            array[98] = 86;
  97.            IRComm.d = array;
  98.            num2++;
  99.            object obj7 = new CookieContainer();
  100.            this.kc("First Hit Inp = " + obj5);
  101.            if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, 60000, 60000, ref obj6, ref str3, ref this.k))
  102.            {
  103.                this.kc("First Hit Failed. err = " + str3);
  104.                if (num2 >= 4)
  105.                {
  106.                    break;
  107.                }
  108.            }
  109.            else
  110.            {
  111.                this.kc("First Output htm = " + obj6);
  112.                if ((!obj6.Contains("'CHECKSUMHASH'") && !obj6.Contains("Our system encountered an obstacle")) || num2 >= 5)
  113.                {
  114.                    goto IL_386;
  115.                }
  116.            }
  117.        }
  118.        A_4 = "Paytm Gateway not working - Payment Failed";
  119.        int result2 = 0;
  120.        return result2 != 0;
  121.         IL_386:
  122.        if (!string.IsNullOrEmpty(obj6.Trim()) && obj6.Contains("Paytm Secure"))
  123.        {
  124.            a_ = obj4;
  125.            object str4 = "https://secure.paytm.in/oltp-web/";
  126.            int num3 = obj6.IndexOf("action=");
  127.            num3 = obj6.IndexOf("\"", num3) + 1;
  128.            int length = obj6.IndexOf("\"", num3) - num3;
  129.            obj4 = str4 + obj6.Substring(num3, length);
  130.            obj5 = "txnMode=NB&txn_Mode=NB&channelId=WEB&AUTH_MODE=USRPWD&bankCode=IDBI&walletAmount=0&bank=IDBI&submit-btn=Pay+now";
  131.            this.kc("Second Hit Inp = " + obj5);
  132.            object obj7;
  133.            if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, 60000, 60000, ref obj6, ref str3, ref this.k))
  134.            {
  135.                this.kc("First Hit Failed. err = " + str3);
  136.                A_4 = "Paytm Gateway not working - Payment Failed";
  137.                result2 = 0;
  138.                return result2 != 0;
  139.            }
  140.            this.kc("Second Output htm = " + obj6);
  141.            if (obj6.IndexOf("idbibank.co.in", StringComparison.CurrentCultureIgnoreCase) <= 0)
  142.            {
  143.                A_4 = "Error Occured while Making Payment!";
  144.                this.kc(A_4 + ", Check HTML");
  145.                result2 = 0;
  146.                return result2 != 0;
  147.            }
  148.            obj5 = k.vd(obj6, ref obj4, false);
  149.            object str5 = "https://inet.idbibank.co.in/corp/";
  150.            this.kc("First Hit : Inp = " + obj5);
  151.            if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, num, num, ref obj6, ref str3, ref this.k))
  152.            {
  153.                this.kc("First Hit Failed. err = " + str3);
  154.                A_4 = "IDBI Not Working - Payment Failed";
  155.                result2 = 0;
  156.                return result2 != 0;
  157.            }
  158.            this.kc("First Output htm = " + obj6);
  159.            if (!string.IsNullOrEmpty(obj6.Trim()) && obj6.Contains("CustomerID"))
  160.            {
  161.                num3 = obj6.IndexOf("ACTION");
  162.                num3 = obj6.IndexOf("=", num3) + 1;
  163.                num3 = obj6.IndexOf("\"", num3) + 1;
  164.                length = obj6.IndexOf("\"", num3) - num3;
  165.                object str6 = obj6.Substring(num3, length);
  166.                object str7 = "29304E87583278923487A64389764380763087426708234658764320F8764387645678023467843678657678243678934208346543763426342087364764378623487165321780324643278643287634807347867463247864326D43204376743286743290874784C3260409A876";
  167.                num3 = obj6.IndexOf("gRandomId()");
  168.                if (num3 > 0)
  169.                {
  170.                    num3 = obj6.IndexOf("'", num3) + 1;
  171.                    length = obj6.IndexOf("'", num3) - num3;
  172.                    object str8 = obj6.Substring(num3, length);
  173.                    object inArray = k.be(Encoding.Default.GetBytes(str8 + str7), Encoding.Default.GetBytes(str));
  174.                    str = Convert.ToBase64String(inArray);
  175.                    obj5 = string.Concat(new string[]
  176.                    {
  177.                        "CorporateSignonCorpId=",
  178.                        obj3,
  179.                        "&CorporateSignonPassword=",
  180.                        HttpUtility.UrlEncode(str),
  181.                        "&Action.ShoppingMall.Signon=+Login+&isEncrypted=Y"
  182.                    });
  183.                }
  184.                else
  185.                {
  186.                    obj5 = string.Concat(new string[]
  187.                    {
  188.                        "CorporateSignonCorpId=",
  189.                        obj3,
  190.                        "&CorporateSignonPassword=",
  191.                        HttpUtility.UrlEncode(str),
  192.                        "&Action.ShoppingMall.Signon=+Login+"
  193.                    });
  194.                }
  195.                a_ = obj4;
  196.                obj4 = str5 + str6;
  197.                this.kc("Second Hit : Inp = " + obj5);
  198.                if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, num, num, ref obj6, ref str3, ref this.k))
  199.                {
  200.                    this.kc("Second Hit Failed. err = " + str3);
  201.                    A_4 = "Failed while making Payment. Payment Not Done";
  202.                    result2 = 0;
  203.                    return result2 != 0;
  204.                }
  205.                this.kc("Second Hit Output = " + obj6);
  206.                if (!obj6.Contains("Payment Amount"))
  207.                {
  208.                    if (obj6.Contains("errormsg"))
  209.                    {
  210.                        num3 = obj6.IndexOf("errormsg");
  211.                        num3 = obj6.IndexOf(">", num3) + 1;
  212.                        length = obj6.IndexOf("<", num3) - num3;
  213.                        A_4 = obj6.Substring(num3, length).Trim();
  214.                    }
  215.                    if (string.IsNullOrEmpty(A_4))
  216.                    {
  217.                        A_4 = "Failed while Login into IDBI";
  218.                    }
  219.                    this.kc("Second Hit, Not valid HTML err = " + A_4);
  220.                    result2 = 0;
  221.                    return result2 != 0;
  222.                }
  223.                num3 = obj6.IndexOf("ACTION");
  224.                num3 = obj6.IndexOf("=", num3) + 1;
  225.                num3 = obj6.IndexOf("\"", num3) + 1;
  226.                length = obj6.IndexOf("\"", num3) - num3;
  227.                str6 = obj6.Substring(num3, length);
  228.                obj5 = "retrnflag=1&UserAccountsIndex=0&bills.PaymentRemarks=Booking&bills.HotPaymentFlag=Y&Action.Bills.ShoppingMall.MakePayment.Pay.x=&Action.Bills.ShoppingMall.MakePayment.Pay.y=";
  229.                a_ = obj4;
  230.                obj4 = str5 + str6;
  231.                this.kc("Third Hit Inp = " + obj5);
  232.                if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, num, num, ref obj6, ref str3, ref this.k))
  233.                {
  234.                    this.kc("Third Hit Failed. err = " + str3);
  235.                    A_4 = "Failed while making Payment. Payment Not Done";
  236.                    result2 = 0;
  237.                    return result2 != 0;
  238.                }
  239.                this.kc("Third Hit Output = " + obj6);
  240.                if (!obj6.Contains("Enter your Transaction Password"))
  241.                {
  242.                    A_4 = "";
  243.                    if (obj6.Contains("errormsg"))
  244.                    {
  245.                        num3 = obj6.IndexOf("errormsg");
  246.                        num3 = obj6.IndexOf(">", num3) + 1;
  247.                        length = obj6.IndexOf("<", num3) - num3;
  248.                        A_4 = obj6.Substring(num3, length).Trim();
  249.                    }
  250.                    if (string.IsNullOrEmpty(A_4))
  251.                    {
  252.                        A_4 = "Failed while Processing into IDBI";
  253.                    }
  254.                    this.kc("Third Hit Failed, Not valid HTML err = " + A_4);
  255.                    result2 = 0;
  256.                    return result2 != 0;
  257.                }
  258.                num3 = obj6.IndexOf("gRandomId()");
  259.                if (num3 > 0)
  260.                {
  261.                    num3 = obj6.IndexOf("'", num3) + 1;
  262.                    length = obj6.IndexOf("'", num3) - num3;
  263.                    object str8 = obj6.Substring(num3, length);
  264.                    object inArray = k.be(Encoding.Default.GetBytes(str8 + str7), Encoding.Default.GetBytes(str2));
  265.                    str2 = Convert.ToBase64String(inArray);
  266.                    obj5 = string.Concat(new string[]
  267.                    {
  268.                        "ValCorpTxnPwdUserName=",
  269.                        obj3,
  270.                        "&ValCorpTxnPwdTxnPwd=",
  271.                        HttpUtility.UrlEncode(str2),
  272.                        "&Action.bills.Eticketing.ShoppingMall.TxnLogin.Ok=%A0%A0%A0Pay%A0%A0%A0&isEncrypted=Y"
  273.                    });
  274.                }
  275.                else
  276.                {
  277.                    obj5 = string.Concat(new string[]
  278.                    {
  279.                        "ValCorpTxnPwdUserName=",
  280.                        obj3,
  281.                        "&ValCorpTxnPwdTxnPwd=",
  282.                        HttpUtility.UrlEncode(str2),
  283.                        "&Action.bills.Eticketing.ShoppingMall.TxnLogin.Ok=%A0%A0%A0Pay%A0%A0%A0"
  284.                    });
  285.                }
  286.                a_ = obj4;
  287.                obj4 = obj4.Replace("M%3D", "A%3D");
  288.                this.kc("Fourth Hit Inp = " + obj5);
  289.                if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, num, num, ref obj6, ref str3, ref this.k))
  290.                {
  291.                    this.kc("Fourth Hit Failed. err = " + str3);
  292.                    A_4 = "Failed while making Payment at IDBI. Ticket Not Booked";
  293.                    result2 = 0;
  294.                    return result2 != 0;
  295.                }
  296.                this.kc("Fourth Hit output = " + obj6);
  297.                if (!obj6.Contains("Your transaction has been completed successfully"))
  298.                {
  299.                    A_4 = "";
  300.                    if (obj6.Contains("errormsg"))
  301.                    {
  302.                        num3 = obj6.IndexOf("errormsg");
  303.                        num3 = obj6.IndexOf(">", num3) + 1;
  304.                        length = obj6.IndexOf("<", num3) - num3;
  305.                        str3 = obj6.Substring(num3, length).Trim();
  306.                    }
  307.                    if (string.IsNullOrEmpty(A_4))
  308.                    {
  309.                        A_4 = "Failed while Processing into IDBI, Ticket Not Booked";
  310.                    }
  311.                    this.kc("Fourth Hit Failed, Not valid HTML err = " + A_4);
  312.                    result2 = 0;
  313.                    return result2 != 0;
  314.                }
  315.                a_ = obj4;
  316.                obj5 = k.vd(obj6, ref obj4, false);
  317.                this.kc("Fourth Hit Inp = " + obj5);
  318.                if (!this.md(obj4, obj5, a_, this.d, ref obj7, true, true, 60000, 60000, ref obj6, ref str3, ref this.k))
  319.                {
  320.                    this.kc("Fourth Hit Failed. err = " + str3);
  321.                    A_4 = "Gateway Not Working - Payment Failed";
  322.                    result2 = 0;
  323.                    return result2 != 0;
  324.                }
  325.                this.kc("Fourth Output htm = " + obj6);
  326.                if (obj6.IndexOf("Transaction is being processed", StringComparison.CurrentCultureIgnoreCase) <= 0)
  327.                {
  328.                    A_4 = "Error Occured while Making Payment!";
  329.                    this.kc(A_4 + ", Check HTML");
  330.                    result2 = 0;
  331.                    return result2 != 0;
  332.                }
  333.                this.kc("Success ProcessIDBIPayTM");
  334.                A_3 = obj6;
  335.                A_4 = obj4;
  336.                result2 = 1;
  337.                return result2 != 0;
  338.            }
  339.        }
  340.    }
  341.    catch (Exception obj8)
  342.    {
  343.        this.lc("ProcessIDBIPayTM", obj8.Message);
  344.        result = 0;
  345.    }
  346.    return result != 0;
  347. }
Add Comment
Please, Sign In to add comment