Beispiel #1
0
        /// <summary>
        /// �˿�
        /// </summary>
        /// <param name="p1_MerId">�̻����</param>
        /// <param name="keyValue">�̻���Կ</param>
        /// <param name="pb_TrxId">yeepay��ˮ��</param>
        /// <param name="p3_Amt">�˿���</param>
        /// <param name="p4_Cur">����</param>
        /// <param name="p5_Desc">�˿�˵��</param>
        /// <returns></returns>
        public static BuyRefundOrdResult RefundOrd(string pb_TrxId, string p3_Amt, string p4_Cur, string p5_Desc)
        {
            string sbOld = "";

            sbOld += "RefundOrd";
            sbOld += merchantId;
            sbOld += pb_TrxId;
            sbOld += p3_Amt;
            sbOld += p4_Cur;

            sbOld += p5_Desc;

            string hmac = Digest.HmacSign(sbOld, keyValue);
            logstr(pb_TrxId, sbOld, hmac);
            string para = "";

            para += "?p0_Cmd=RefundOrd";
            para += "&p1_MerId=" + merchantId;	    	//�����̼�ID
            para += "&pb_TrxId=" + pb_TrxId;
            para += "&p3_Amt=" + p3_Amt;				//���빺�򶩵�����
            para += "&p4_Cur=" + p4_Cur;

            para += "&p5_Desc=" + HttpUtility.UrlEncode(p5_Desc, System.Text.Encoding.GetEncoding("gb2312"));
            para += "&hmac=" + hmac;      	    //��������

            string reqResult = HttpUtils.SendRequest(queryRefundReqURL, para);

            string r0_Cmd	= FormatQueryString.GetQueryString("r0_Cmd", reqResult, '\n');
            string r1_Code	= FormatQueryString.GetQueryString("r1_Code", reqResult, '\n');
            string r2_TrxId	= FormatQueryString.GetQueryString("r2_TrxId", reqResult, '\n');
            string r3_Amt	= FormatQueryString.GetQueryString("r3_Amt", reqResult, '\n');
            string r4_Cur	= FormatQueryString.GetQueryString("r4_Cur", reqResult, '\n');

            hmac = FormatQueryString.GetQueryString("hmac", reqResult, '\n');
            //string hmac		= FormatQueryString.GetQueryString("hmac", reqResult, '\n');

            BuyRefundOrdResult result = new BuyRefundOrdResult(r0_Cmd, r1_Code, r2_TrxId, r3_Amt, r4_Cur, hmac);

            return result;
        }