using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV
{
///
/// 微信支付提交的XML Data数据[查询订单]
///
public class WxPayV3OrderRefundRequestData : AbstractRequestData
{
///
/// 公众账号ID
///
public string AppId { get; set; }
///
/// 商户号
///
public string MchId { get; set; }
///
/// 子商户号
///
public string SubMchId { get; set; }
///
/// 微信的订单号,建议优先使用
///
public string TransactionId { get; set; }
///
///商户系统内部的订单号,请确保在同一商户号下唯一
///
public string OutTradeNo { get; set; }
///
/// 商户退款单号
///
public string OutRefundNo { get; set; }
///
/// 随机字符串
///
public string NonceStr { get; set; }
///
/// 订单总金额,单位为分,只能为整数
///
public string TotalFee { get; set; }
///
/// 退款总金额,订单总金额,单位为分,只能为整数
///
public string RefundFee { get; set; }
///
/// 货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY
///
public string RefundFeeType { get; set; }
///
/// 退款原因 若商户传入,会在下发给用户的退款消息中体现退款原因
///
public string RefundDesc { get; set; }
///
/// 签名类型
///
public string SignType { get; set; }
///
///
///
public string Key { get; set; }
public readonly string Sign;
///
/// 订单退款 请求参数
///
///
///
///
///
///
///
///
///
///
public WxPayV3OrderRefundRequestData(string appId , string mchId, string subMchId, string key, string nonceStr , string transactionId, string outTradeNo, string outRefundNo,
string totalFee, string refundFee, string refundFeeType, string refundDesc, string signType = null)
{
AppId = appId;
MchId = mchId;
NonceStr = nonceStr;
TransactionId = transactionId;
OutTradeNo = outTradeNo;
SignType = signType;
Key = key;
TotalFee = totalFee;
RefundFee = refundFee;
RefundFeeType = refundFeeType;
RefundDesc = refundDesc;
OutRefundNo = outRefundNo;
SubMchId = subMchId;
#region 设置Request请求参数
//设置package订单参数
NewParameters.Add("appid" , this.AppId); //公众账号ID
NewParameters.Add("mch_id" , this.MchId); //商户号
NewParameters.Add("sub_mch_id", this.SubMchId); //子商户号
NewParameters.Add("transaction_id" , this.TransactionId ?? ""); //微信的订单号
NewParameters.Add("out_trade_no" , this.OutTradeNo ?? ""); //商户系统内部的订单号
NewParameters.Add("nonce_str", this.NonceStr); //随机字符串
NewParameters.Add("out_refund_no", this.OutRefundNo); //商户退款单号
NewParameters.Add("total_fee", this.TotalFee + ""); //订单金额
NewParameters.Add("refund_fee", this.RefundFee + ""); //退款金额
NewParameters.Add("refund_fee_type", this.RefundFeeType); //货币种类
NewParameters.Add("refund_desc", this.RefundDesc); //退款原因
NewParameters.Add("sign_type" , this.SignType); //签名类型
Sign = CreateMd5Sign("key" , this.Key);
NewParameters.Add("sign" , Sign); //签名
#endregion
}
}
}