Exemplo n.º 1
0
        public static BuyBankDirectConnectResult BankDirectConnect(string p1_MerId, string keyValue, string p2_Order, string p3_Amt, string p4_Cur, string p5_Pid, string p6_Pcat, string p7_Pdesc, string pa7_cardNo, string pa8_cardPwd, string pa_MP, string pd_FrpId)
        {
            string aValue = "";

            aValue = (((((aValue + "BankDirectConnect" + p1_MerId) + p2_Order + p3_Amt) + p4_Cur + p5_Pid) + p6_Pcat + p7_Pdesc) + DES.Encrypt3DESJW(pa7_cardNo, keyValue) + DES.Encrypt3DESJW(pa8_cardPwd, keyValue)) + pa_MP + pd_FrpId;
            string para = "";

            para = ((((((((((((para + "?p0_Cmd=BankDirectConnect") + "&p1_MerId=" + p1_MerId) + "&p2_Order=" + p2_Order) + "&p3_Amt=" + p3_Amt) + "&p4_Cur=" + p4_Cur) + "&p5_Pid=" + HttpUtility.UrlEncode(p5_Pid, Encoding.GetEncoding("gb2312"))) + "&p6_Pcat=" + HttpUtility.UrlEncode(p6_Pcat, Encoding.GetEncoding("gb2312"))) + "&p7_Pdesc=" + HttpUtility.UrlEncode(p7_Pdesc, Encoding.GetEncoding("gb2312"))) + "&pa7_cardNo=" + HttpUtility.UrlEncode(DES.Encrypt3DESJW(pa7_cardNo, keyValue), Encoding.GetEncoding("gb2312"))) + "&pa8_cardPwd=" + HttpUtility.UrlEncode(DES.Encrypt3DESJW(pa8_cardPwd, keyValue), Encoding.GetEncoding("gb2312"))) + "&pa_MP=" + HttpUtility.UrlEncode(pa_MP, Encoding.GetEncoding("gb2312"))) + "&pd_FrpId=" + pd_FrpId) + "&hmac=" + Digest.HmacSign(aValue, keyValue);
            string strUrl = HttpUtils.SendRequest(nodeAuthorizationURL_Jun, para);
            string str4   = FormatQueryString.GetQueryString("r0_Cmd", strUrl, '\n');
            string str5   = FormatQueryString.GetQueryString("r1_Code", strUrl, '\n');
            string str6   = FormatQueryString.GetQueryString("r2_TrxId", strUrl, '\n');
            string str7   = FormatQueryString.GetQueryString("r3_Amt", strUrl, '\n');
            string str8   = FormatQueryString.GetQueryString("r4_Cur", strUrl, '\n');
            string str9   = FormatQueryString.GetQueryString("r6_Order", strUrl, '\n');
            string str10  = FormatQueryString.GetQueryString("ro_BankOrderId", strUrl, '\n');
            string str11  = FormatQueryString.GetQueryString("r8_MP", strUrl, '\n');

            return(new BuyBankDirectConnectResult(str4, str5, str6, str7, str8, str9, str10, str11, FormatQueryString.GetQueryString("hmac", strUrl, '\n'), nodeAuthorizationURL_Jun + para, strUrl));
        }