|
|
@@ -0,0 +1,159 @@
|
|
|
+using System.Collections.Generic;
|
|
|
+using Essensoft.AspNetCore.Payment.UnionPay.Response;
|
|
|
+
|
|
|
+namespace Essensoft.AspNetCore.Payment.UnionPay.Request
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// 手机网页支付(V2.2) 消费撤销接口
|
|
|
+ /// </summary>
|
|
|
+ public class UnionPayWapPayConsumeUndoRequest : IUnionPayRequest<UnionPayWapPayConsumeUndoResponse>
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// 产品类型
|
|
|
+ /// </summary>
|
|
|
+ public string BizType { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 订单发送时间
|
|
|
+ /// </summary>
|
|
|
+ public string TxnTime { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 后台通知地址
|
|
|
+ /// </summary>
|
|
|
+ public string BackUrl { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 交易金额
|
|
|
+ /// </summary>
|
|
|
+ public string TxnAmt { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 交易类型
|
|
|
+ /// </summary>
|
|
|
+ public string TxnType { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 交易子类
|
|
|
+ /// </summary>
|
|
|
+ public string TxnSubType { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 渠道类型
|
|
|
+ /// </summary>
|
|
|
+ public string ChannelType { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 商户订单号
|
|
|
+ /// </summary>
|
|
|
+ public string OrderId { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 原交易查询流水号
|
|
|
+ /// </summary>
|
|
|
+ public string OrigQryId { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二级商户代码
|
|
|
+ /// </summary>
|
|
|
+ public string SubMerId { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二级商户简称
|
|
|
+ /// </summary>
|
|
|
+ public string SubMerAbbr { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二级商户名称
|
|
|
+ /// </summary>
|
|
|
+ public string SubMerName { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 商户简称
|
|
|
+ /// </summary>
|
|
|
+ public string MerAbbr { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 商户类别
|
|
|
+ /// </summary>
|
|
|
+ public string MerCatCode { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 商户名称
|
|
|
+ /// </summary>
|
|
|
+ public string MerName { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 收单机构代码
|
|
|
+ /// </summary>
|
|
|
+ public string AcqInsCode { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 保留域
|
|
|
+ /// </summary>
|
|
|
+ public string Reserved { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 请求方保留域
|
|
|
+ /// </summary>
|
|
|
+ public string ReqReserved { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 终端号
|
|
|
+ /// </summary>
|
|
|
+ public string TermId { get; set; }
|
|
|
+
|
|
|
+ #region IUnionPayRequest
|
|
|
+
|
|
|
+ private string version = string.Empty;
|
|
|
+
|
|
|
+ public string GetApiVersion()
|
|
|
+ {
|
|
|
+ return version;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetApiVersion(string version)
|
|
|
+ {
|
|
|
+ this.version = version;
|
|
|
+ }
|
|
|
+
|
|
|
+ public IDictionary<string, string> GetParameters()
|
|
|
+ {
|
|
|
+ var parameters = new UnionPayDictionary
|
|
|
+ {
|
|
|
+ { "bizType", BizType },
|
|
|
+ { "txnTime", TxnTime },
|
|
|
+ { "backUrl", BackUrl },
|
|
|
+ { "txnAmt", TxnAmt },
|
|
|
+ { "txnType", TxnType },
|
|
|
+ { "txnSubType", TxnSubType },
|
|
|
+ { "channelType", ChannelType },
|
|
|
+ { "orderId", OrderId },
|
|
|
+ { "origQryId", OrigQryId },
|
|
|
+ { "subMerId", SubMerId },
|
|
|
+ { "subMerAbbr", SubMerAbbr },
|
|
|
+ { "subMerName", SubMerName },
|
|
|
+ { "merAbbr", MerAbbr },
|
|
|
+ { "merCatCode", MerCatCode },
|
|
|
+ { "merName", MerName },
|
|
|
+ { "acqInsCode", AcqInsCode },
|
|
|
+ { "reserved", Reserved },
|
|
|
+ { "reqReserved", ReqReserved },
|
|
|
+ { "termId", TermId }
|
|
|
+ };
|
|
|
+ return parameters;
|
|
|
+ }
|
|
|
+
|
|
|
+ public string GetRequestUrl(bool isTest)
|
|
|
+ {
|
|
|
+ return isTest ? "https://101.231.204.80:5000/gateway/api/backTransReq.do" : "https://gateway.95516.com/gateway/api/backTransReq.do";
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool HasEncryptCertId()
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+}
|