/// <summary> /// 获取签名值 /// </summary> /// <param name="key">自己设置的证书密钥</param> /// <returns></returns> public string GetSign(string key) { SortedDictionary <string, string> sParams = new SortedDictionary <string, string>(); sParams.Add("appid", this.appid); sParams.Add("return_code", this.return_code); sParams.Add("return_msg", this.return_msg); sParams.Add("mch_id", this.mch_id); sParams.Add("nonce_str", this.nonce_str); sParams.Add("result_code", this.result_code); sParams.Add("err_code", this.err_code); sParams.Add("err_code_des", this.err_code_des); sParams.Add("trade_state", this.trade_state); sParams.Add("device_info", this.device_info); sParams.Add("openid", this.openid); sParams.Add("is_subscribe", this.is_subscribe); sParams.Add("trade_type", this.trade_type); sParams.Add("bank_type", this.bank_type); sParams.Add("cash_fee", this.cash_fee); sParams.Add("total_fee", this.total_fee); sParams.Add("coupon_fee", this.coupon_fee); sParams.Add("fee_type", this.fee_type); sParams.Add("transaction_id", this.transaction_id); sParams.Add("out_trade_no", this.out_trade_no); sParams.Add("attach", this.attach); sParams.Add("time_end", this.time_end); return(WXPayTool.GetSign(sParams, key)); }
/// <summary> /// 获取签名值 /// </summary> /// <param name="key">自己设置的证书密钥</param> /// <returns></returns> public string GetSign(string key) { SortedDictionary <string, string> sParams = new SortedDictionary <string, string>(); sParams.Add("appid", this.appid); sParams.Add("mch_id", this.mch_id); sParams.Add("transaction_id", this.transaction_id); sParams.Add("out_trade_no", this.out_trade_no); sParams.Add("nonce_str", this.nonce_str); return(WXPayTool.GetSign(sParams, key)); }
/// <summary> /// 获取签名值 /// </summary> /// <param name="key">自己设置的证书密钥</param> /// <returns></returns> public string GetSign(string key) { SortedDictionary <string, string> sParams = new SortedDictionary <string, string>(); sParams.Add("appid", this.appid); sParams.Add("partnerid", this.partnerid); sParams.Add("prepayid", this.prepayid); sParams.Add("noncestr", this.noncestr); sParams.Add("package", this.package); sParams.Add("timestamp", this.timestamp.ToString()); return(WXPayTool.GetSign(sParams, key)); }