Beispiel #1
0
 protected override void AddBizParams()
 {
     PayParams
     .SafeAdd("body", m_PayRequest.Order.Description)
     .SafeAdd("out_trade_no", m_PayRequest.Order.OrderId)
     .SafeAdd("total_fee", m_PayRequest.Order.Amount.ToString())
     .SafeAdd("spbill_create_ip", m_PayRequest.ClientIp)
     .SafeAdd("notify_url", m_PayRequest.NotifyUrl)
     .SafeAdd("trade_type", GetTradeType(m_PayRequest.TradeType))
     .SafeAdd("product_id", m_PayRequest.Order.ProductId);
 }
Beispiel #2
0
        protected override void InitParams()
        {
            PayParams.Clear();

            PayParams
            .SafeAdd("mch_id", m_Merchant.Id)
            .SafeAdd("nonce_str", GenerateNonceString());

            var sign = PayParams.ToSortDict().WechatSign(m_Merchant.ApiSecret);

            PayParams.SafeAdd("sign", sign);
        }
Beispiel #3
0
        protected virtual void InitParams()
        {
            PayParams.Clear();

            PayParams
            .SafeAdd("appid", m_Merchant.AppId)
            .SafeAdd("mch_id", m_Merchant.Id)
            .SafeAdd("nonce_str", GenerateNonceString());

            AddBizParams();

            var sign = PayParams.ToSortDict().WechatSign(m_Merchant.SignKey);

            PayParams.SafeAdd("sign", sign);
        }
Beispiel #4
0
 protected override void AddBizParams()
 {
     PayParams
     .SafeAdd("out_trade_no", m_PayRequest.Order.OrderId);
 }