Пример #1
0
        /// <summary>
        /// 支付参数签名(请勿修改本代码)
        /// </summary>
        /// <param name="data">通联支付数据</param>
        /// <returns></returns>
        public static string RequestSign(AllinpayData data)
        {
            RequestOrder requestOrder = new RequestOrder();

            requestOrder.setInputCharset(data.GetValue("inputCharset"));
            requestOrder.setPickupUrl(data.GetValue("pickupUrl"));
            requestOrder.setReceiveUrl(data.GetValue("receiveUrl"));
            requestOrder.setVersion(data.GetValue("version"));
            requestOrder.setLanguage(data.GetValue("language"));
            requestOrder.setSignType(data.GetValue("signType"));
            requestOrder.setMerchantId(data.GetValue("merchantId"));
            requestOrder.setPayerName(data.GetValue("payerName"));
            requestOrder.setPayerEmail(data.GetValue("payerEmail"));
            requestOrder.setPayerTelephone(data.GetValue("payerTelephone"));
            requestOrder.setPayerIDCard(data.GetValue("payerIDCard"));
            requestOrder.setPid(data.GetValue("pid"));
            requestOrder.setOrderNo(data.GetValue("orderNo"));
            requestOrder.setOrderAmount(data.GetValue("orderAmount"));
            requestOrder.setOrderCurrency(data.GetValue("orderCurrency"));
            requestOrder.setOrderDatetime(data.GetValue("orderDatetime"));
            requestOrder.setOrderExpireDatetime(data.GetValue("orderExpireDatetime"));
            requestOrder.setProductName(data.GetValue("productName"));
            requestOrder.setProductPrice(data.GetValue("productPrice"));
            requestOrder.setProductNum(data.GetValue("productNum"));
            requestOrder.setProductId(data.GetValue("productId"));
            requestOrder.setProductDesc(data.GetValue("productDesc"));
            requestOrder.setExt1(data.GetValue("ext1"));
            requestOrder.setExt2(data.GetValue("ext2"));
            requestOrder.setExtTL(data.GetValue("extTL"));
            requestOrder.setPayType(data.GetValue("payType"));
            requestOrder.setIssuerId(data.GetValue("issuerId"));
            requestOrder.setPan(data.GetValue("pan"));
            requestOrder.setTradeNature(data.GetValue("tradeNature"));
            requestOrder.setKey(AppConfig.Global.AllinpayKey);
            string sign = requestOrder.doSign();

            return(sign);
        }