mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-06-02 05:50:29 +08:00
各个支付渠道的支付回调消息实现
This commit is contained in:
@@ -2,6 +2,7 @@ package com.egzosn.pay.ali.api;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.egzosn.pay.ali.bean.AliPayMessage;
|
||||
import com.egzosn.pay.ali.bean.AliTransactionType;
|
||||
import com.egzosn.pay.ali.bean.OrderSettle;
|
||||
import com.egzosn.pay.common.api.BasePayService;
|
||||
@@ -608,4 +609,14 @@ public class AliPayService extends BasePayService<AliPayConfigStorage> {
|
||||
return JSON.toJSONString(getBizContent(tradeNo, outTradeNo, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建消息
|
||||
*
|
||||
* @param message 支付平台返回的消息
|
||||
* @return 支付消息对象
|
||||
*/
|
||||
@Override
|
||||
public PayMessage createMessage(Map<String, Object> message) {
|
||||
return AliPayMessage.create(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
package com.egzosn.pay.ali.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.egzosn.pay.common.bean.PayMessage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 支付宝回调信息
|
||||
*
|
||||
* @author egan
|
||||
* email egzosn@gmail.com
|
||||
* date 2019/6/30.19:19
|
||||
*/
|
||||
|
||||
public class AliPayMessage extends PayMessage {
|
||||
//notify_time 通知时间 Date 是 通知的发送时间。格式为yyyy-MM-dd HH:mm:ss 2015-14-27 15:45:58
|
||||
@JSONField(name = "notify_time")
|
||||
private Date notifyTime;
|
||||
//notify_type 通知类型 String(64) 是 通知的类型 trade_status_sync
|
||||
@JSONField(name = "notify_type")
|
||||
private String notifyType;
|
||||
// notify_id 通知校验ID String(128) 是 通知校验ID ac05099524730693a8b330c5ecf72da9786
|
||||
@JSONField(name = "notify_id")
|
||||
private String notifyId;
|
||||
// app_id 支付宝分配给开发者的应用Id String(32) 是 支付宝分配给开发者的应用Id 2014072300007148
|
||||
@JSONField(name = "app_id")
|
||||
private String appId;
|
||||
// charset 编码格式 String(10) 是 编码格式,如utf-8、gbk、gb2312等 utf-8
|
||||
private String charset;
|
||||
// version 接口版本 String(3) 是 调用的接口版本,固定为:1.0 1.0
|
||||
private String version;
|
||||
// sign_type 签名类型 String(10) 是 商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2 RSA2
|
||||
@JSONField(name = "sign_type")
|
||||
private String signType;
|
||||
// sign 签名 String(256) 是 请参考文末 异步返回结果的验签 601510b7970e52cc63db0f44997cf70e
|
||||
private String sign;
|
||||
// trade_no 支付宝交易号 String(64) 是 支付宝交易凭证号 2013112011001004330000121536
|
||||
@JSONField(name = "trade_no")
|
||||
private String tradeNo;
|
||||
// out_trade_no 商户订单号 String(64) 是 原支付请求的商户订单号 6823789339978248
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
// out_biz_no 商户业务号 String(64) 否 商户业务ID,主要是退款通知中返回退款申请的流水号 HZRF001
|
||||
@JSONField(name = "out_biz_no")
|
||||
private String outBizNo;
|
||||
// buyer_id 买家支付宝用户号 String(16) 否 买家支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字 2088102122524333
|
||||
@JSONField(name = "buyer_id")
|
||||
private String buyerId;
|
||||
// buyer_logon_id 买家支付宝账号 String(100) 否 买家支付宝账号 15901825620
|
||||
@JSONField(name = "buyer_logon_id")
|
||||
private String buyerLogonId;
|
||||
// seller_id 卖家支付宝用户号 String(30) 否 卖家支付宝用户号 2088101106499364
|
||||
@JSONField(name = "seller_id")
|
||||
private String sellerId;
|
||||
// seller_email 卖家支付宝账号 String(100) 否 卖家支付宝账号 zhuzhanghu@alitest.com
|
||||
@JSONField(name = "seller_email")
|
||||
private String sellerEmail;
|
||||
// trade_status 交易状态 String(32) 否 交易目前所处的状态,见下张表 交易状态说明 TRADE_CLOSED
|
||||
@JSONField(name = "trade_status")
|
||||
private String tradeStatus;
|
||||
// total_amount 订单金额 Number(9,2) 否 本次交易支付的订单金额,单位为人民币(元) 20
|
||||
@JSONField(name = "total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
// receipt_amount 实收金额 Number(9,2) 否 商家在交易中实际收到的款项,单位为元 15
|
||||
@JSONField(name = "receipt_amount")
|
||||
private BigDecimal receiptAmount;
|
||||
// invoice_amount 开票金额 Number(9,2) 否 用户在交易中支付的可开发票的金额 10.00
|
||||
@JSONField(name = "invoice_amount")
|
||||
private BigDecimal invoiceAmount;
|
||||
// buyer_pay_amount 付款金额 Number(9,2) 否 用户在交易中支付的金额 13.88
|
||||
@JSONField(name = "buyer_pay_amount")
|
||||
private BigDecimal buyerPayAmount;
|
||||
// point_amount 集分宝金额 Number(9,2) 否 使用集分宝支付的金额 12.00
|
||||
@JSONField(name = "point_amount")
|
||||
private BigDecimal pointAmount;
|
||||
// refund_fee 总退款金额 Number(9,2) 否 退款通知中,返回总退款金额,单位为元,支持两位小数 2.58
|
||||
@JSONField(name = "refund_fee")
|
||||
private BigDecimal refundFee;
|
||||
// subject 订单标题 String(256) 否 商品的标题/交易标题/订单标题/订单关键字等,是请求时对应的参数,原样通知回来 当面付交易
|
||||
@JSONField(name = "subject")
|
||||
private String subject;
|
||||
// body 商品描述 String(400) 否 该订单的备注、描述、明细等。对应请求时的body参数,原样通知回来 当面付交易内容
|
||||
@JSONField(name = "body")
|
||||
private String body;
|
||||
// gmt_create 交易创建时间 Date 否 该笔交易创建的时间。格式为yyyy-MM-dd HH:mm:ss 2015-04-27 15:45:57
|
||||
@JSONField(name = "gmt_create")
|
||||
private Date gmtCreate;
|
||||
// gmt_payment 交易付款时间 Date 否 该笔交易的买家付款时间。格式为yyyy-MM-dd HH:mm:ss 2015-04-27 15:45:57
|
||||
@JSONField(name = "gmt_payment")
|
||||
private Date gmtPayment;
|
||||
// gmt_refund 交易退款时间 Date 否 该笔交易的退款时间。格式为yyyy-MM-dd HH:mm:ss.S 2015-04-28 15:45:57.320
|
||||
@JSONField(name = "gmt_refund")
|
||||
private Date gmtRefund;
|
||||
// gmt_close 交易结束时间 Date 否 该笔交易结束时间。格式为yyyy-MM-dd HH:mm:ss 2015-04-29 15:45:57
|
||||
@JSONField(name = "gmt_close")
|
||||
private Date gmtClose;
|
||||
// fund_bill_list 支付金额信息 String(512) 否 支付成功的各个渠道金额信息,详见下表 资金明细信息说明 [{“amount”:“15.00”,“fundChannel”:“ALIPAYACCOUNT”}]
|
||||
@JSONField(name = "fund_bill_list")
|
||||
private String fundBillList;
|
||||
// passback_params 回传参数 String(512) 否 公共回传参数,如果请求时传递了该参数,则返回给商户时会在异步通知时将该参数原样返回。本参数必须进行UrlEncode之后才可以发送给支付宝 merchantBizType%3d3C%26merchantBizNo%3d2016010101111
|
||||
@JSONField(name = "passback_params")
|
||||
private String passbackParams;
|
||||
// voucher_detail_list 优惠券信息 String 否 本交易支付时所使用的所有优惠券信息,详见下表 优惠券信息说明 [{“amount”:“0.20”,“merchantContribute”:“0.00”,“name”:“一键创建券模板的券名称”,“otherContribute”:“0.20”,“type”:“ALIPAY_DISCOUNT_VOUCHER”,“memo”:“学生卡8折优惠”]
|
||||
@JSONField(name = "voucher_detail_list")
|
||||
private String voucherDetailList;
|
||||
|
||||
public Date getNotifyTime() {
|
||||
return notifyTime;
|
||||
}
|
||||
|
||||
public void setNotifyTime(Date notifyTime) {
|
||||
this.notifyTime = notifyTime;
|
||||
}
|
||||
|
||||
public String getNotifyType() {
|
||||
return notifyType;
|
||||
}
|
||||
|
||||
public void setNotifyType(String notifyType) {
|
||||
this.notifyType = notifyType;
|
||||
}
|
||||
|
||||
public String getNotifyId() {
|
||||
return notifyId;
|
||||
}
|
||||
|
||||
public void setNotifyId(String notifyId) {
|
||||
this.notifyId = notifyId;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getCharset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public void setCharset(String charset) {
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getSignType() {
|
||||
return signType;
|
||||
}
|
||||
|
||||
public void setSignType(String signType) {
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getTradeNo() {
|
||||
return tradeNo;
|
||||
}
|
||||
|
||||
public void setTradeNo(String tradeNo) {
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOutTradeNo() {
|
||||
return outTradeNo;
|
||||
}
|
||||
|
||||
public void setOutTradeNo(String outTradeNo) {
|
||||
this.outTradeNo = outTradeNo;
|
||||
}
|
||||
|
||||
public String getOutBizNo() {
|
||||
return outBizNo;
|
||||
}
|
||||
|
||||
public void setOutBizNo(String outBizNo) {
|
||||
this.outBizNo = outBizNo;
|
||||
}
|
||||
|
||||
public String getBuyerId() {
|
||||
return buyerId;
|
||||
}
|
||||
|
||||
public void setBuyerId(String buyerId) {
|
||||
this.buyerId = buyerId;
|
||||
}
|
||||
|
||||
public String getBuyerLogonId() {
|
||||
return buyerLogonId;
|
||||
}
|
||||
|
||||
public void setBuyerLogonId(String buyerLogonId) {
|
||||
this.buyerLogonId = buyerLogonId;
|
||||
}
|
||||
|
||||
public String getSellerId() {
|
||||
return sellerId;
|
||||
}
|
||||
|
||||
public void setSellerId(String sellerId) {
|
||||
this.sellerId = sellerId;
|
||||
}
|
||||
|
||||
public String getSellerEmail() {
|
||||
return sellerEmail;
|
||||
}
|
||||
|
||||
public void setSellerEmail(String sellerEmail) {
|
||||
this.sellerEmail = sellerEmail;
|
||||
}
|
||||
|
||||
public String getTradeStatus() {
|
||||
return tradeStatus;
|
||||
}
|
||||
|
||||
public void setTradeStatus(String tradeStatus) {
|
||||
this.tradeStatus = tradeStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getReceiptAmount() {
|
||||
return receiptAmount;
|
||||
}
|
||||
|
||||
public void setReceiptAmount(BigDecimal receiptAmount) {
|
||||
this.receiptAmount = receiptAmount;
|
||||
}
|
||||
|
||||
public static final AliPayMessage create(Map<String, Object> message){
|
||||
AliPayMessage payMessage = new JSONObject(message).toJavaObject(AliPayMessage.class);
|
||||
payMessage.setPayMessage(message);
|
||||
return payMessage;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import com.egzosn.pay.common.util.sign.encrypt.RSA;
|
||||
import com.egzosn.pay.common.util.sign.encrypt.RSA2;
|
||||
import com.egzosn.pay.common.util.str.StringUtils;
|
||||
import com.egzosn.pay.union.bean.SDKConstants;
|
||||
import com.egzosn.pay.union.bean.UnionPayMessage;
|
||||
import com.egzosn.pay.union.bean.UnionTransactionType;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -688,6 +689,14 @@ public class UnionPayService extends BasePayService<UnionPayConfigStorage> {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建消息
|
||||
*
|
||||
* @param message 支付平台返回的消息
|
||||
* @return 支付消息对象
|
||||
*/
|
||||
@Override
|
||||
public PayMessage createMessage(Map<String, Object> message) {
|
||||
return UnionPayMessage.create(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
package com.egzosn.pay.union.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.egzosn.pay.common.bean.PayMessage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 银联回调信息
|
||||
*
|
||||
* @author egan
|
||||
* <pre>
|
||||
* email egzosn@gmail.com
|
||||
* date 2019/7/3.22:07
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class UnionPayMessage extends PayMessage {
|
||||
// 查询流水号 queryId AN20..21 M-必填 消费交易的流水号,供后续查询用
|
||||
private String queryId;
|
||||
// 交易币种 currencyCode AN3 M-必填 默认为156
|
||||
private String currencyCode;
|
||||
// 交易传输时间 traceTime MMDDhhmmss M-必填
|
||||
@JSONField(name = "traceTime", format = "MMDDhhmmss")
|
||||
private String traceTime;
|
||||
// 签名 signature ANS1..1024 M-必填
|
||||
private String signature;
|
||||
// 签名方法 signMethod N2 M-必填
|
||||
private String signMethod;
|
||||
// 清算币种 settleCurrencyCode AN3 M-必填
|
||||
private String settleCurrencyCode;
|
||||
// 清算金额 settleAmt N1..12 M-必填
|
||||
private BigDecimal settleAmt;
|
||||
// 清算日期 settleDate MMDD M-必填
|
||||
@JSONField(name = "settleDate", format = "MMDD")
|
||||
private String settleDate;
|
||||
// 系统跟踪号 traceNo N6 M-必填
|
||||
private String traceNo;
|
||||
// 应答码 respCode AN2 M-必填
|
||||
private String respCode;
|
||||
// 应答信息 respMsg ANS1..256 M-必填
|
||||
private String respMsg;
|
||||
// 兑换日期 exchangeDate MMDD C-按条件必填 交易成功,交易币种和清算币种不一致的时候返回
|
||||
@JSONField(name = "exchangeDate", format = "MMDD")
|
||||
private String exchangeDate;
|
||||
// 签名公钥证书 signPubKeyCert AN1..2048 C-按条件必填 使用RSA签名方式时必选,此域填写银联签名公钥证书。
|
||||
private String signPubKeyCert;
|
||||
// 清算汇率 exchangeRate N8 C-按条件必填 交易成功,交易币种和清算币种不一致的时候返回
|
||||
private String exchangeRate;
|
||||
// 账号 accNo AN1..1024 C-按条件必填 根据商户配置返回
|
||||
private String accNo;
|
||||
// 支付方式 payType N4 C-按条件必填 根据商户配置返回
|
||||
private String payType;
|
||||
// 支付卡标识 payCardNo ANS1..19 C-按条件必填 移动支付交易时,根据商户配置返回
|
||||
private String payCardNo;
|
||||
// 支付卡类型 payCardType N2 C-按条件必填 根据商户配置返回
|
||||
private String payCardType;
|
||||
// 支付卡名称 payCardIssueName ANS1..64 C-按条件必填 移动支付交易时,根据商户配置返回
|
||||
private String payCardIssueName;
|
||||
// 版本号 version NS5 R-需要返回
|
||||
private String version;
|
||||
// 绑定标识号 bindId ANS1..128 R-需要返回 绑定支付时,根据商户配置返回
|
||||
private String bindId;
|
||||
// 编码方式 encoding ANS1..20 R-需要返回
|
||||
private String encoding;
|
||||
// 产品类型 bizType N6 R-需要返回
|
||||
private String bizType;
|
||||
// 订单发送时间 txnTime YYYYMMDDhhmmss R-需要返回
|
||||
@JSONField(name = "txnTime", format = "YYYYMMDDhhmmss")
|
||||
private String txnTime;
|
||||
// 交易金额 txnAmt N1..12 R-需要返回
|
||||
private BigDecimal txnAmt;
|
||||
// 交易类型 txnType N2 R-需要返回
|
||||
private String txnType;
|
||||
// 交易子类 txnSubType N2 R-需要返回
|
||||
private String txnSubType;
|
||||
// 接入类型 accessType N1 R-需要返回 0:商户直连接入 1:收单机构接入2:平台商户接入
|
||||
private String accessType;
|
||||
// 请求方保留域 reqReserved ANS1..1024 R-需要返回
|
||||
private String reqReserved;
|
||||
// 商户代码 merId AN15 R-需要返回
|
||||
private String merId;
|
||||
// 商户订单号 orderId AN8..40 R-需要返回 商户订单号,不能含“-”或“_”; 商户自定义,同一交易日期内不可重复; 商户代码merId、商户订单号orderId、订单发送时间txnTime三要素唯一确定一笔交易。 保留域 reserved ANS1..2048O- 选填 查看详情
|
||||
private String orderId;
|
||||
// 分账域 accSplitData ANS1..512O- 选填 查看详情
|
||||
private String accSplitData;
|
||||
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
public String getCurrencyCode() {
|
||||
return currencyCode;
|
||||
}
|
||||
|
||||
public void setCurrencyCode(String currencyCode) {
|
||||
this.currencyCode = currencyCode;
|
||||
}
|
||||
|
||||
public String getTraceTime() {
|
||||
return traceTime;
|
||||
}
|
||||
|
||||
public void setTraceTime(String traceTime) {
|
||||
this.traceTime = traceTime;
|
||||
}
|
||||
|
||||
public String getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String getSignMethod() {
|
||||
return signMethod;
|
||||
}
|
||||
|
||||
public void setSignMethod(String signMethod) {
|
||||
this.signMethod = signMethod;
|
||||
}
|
||||
|
||||
public String getSettleCurrencyCode() {
|
||||
return settleCurrencyCode;
|
||||
}
|
||||
|
||||
public void setSettleCurrencyCode(String settleCurrencyCode) {
|
||||
this.settleCurrencyCode = settleCurrencyCode;
|
||||
}
|
||||
|
||||
public BigDecimal getSettleAmt() {
|
||||
return settleAmt;
|
||||
}
|
||||
|
||||
public void setSettleAmt(BigDecimal settleAmt) {
|
||||
this.settleAmt = settleAmt;
|
||||
}
|
||||
|
||||
public String getSettleDate() {
|
||||
return settleDate;
|
||||
}
|
||||
|
||||
public void setSettleDate(String settleDate) {
|
||||
this.settleDate = settleDate;
|
||||
}
|
||||
|
||||
public String getTraceNo() {
|
||||
return traceNo;
|
||||
}
|
||||
|
||||
public void setTraceNo(String traceNo) {
|
||||
this.traceNo = traceNo;
|
||||
}
|
||||
|
||||
public String getRespCode() {
|
||||
return respCode;
|
||||
}
|
||||
|
||||
public void setRespCode(String respCode) {
|
||||
this.respCode = respCode;
|
||||
}
|
||||
|
||||
public String getRespMsg() {
|
||||
return respMsg;
|
||||
}
|
||||
|
||||
public void setRespMsg(String respMsg) {
|
||||
this.respMsg = respMsg;
|
||||
}
|
||||
|
||||
public String getExchangeDate() {
|
||||
return exchangeDate;
|
||||
}
|
||||
|
||||
public void setExchangeDate(String exchangeDate) {
|
||||
this.exchangeDate = exchangeDate;
|
||||
}
|
||||
|
||||
public String getSignPubKeyCert() {
|
||||
return signPubKeyCert;
|
||||
}
|
||||
|
||||
public void setSignPubKeyCert(String signPubKeyCert) {
|
||||
this.signPubKeyCert = signPubKeyCert;
|
||||
}
|
||||
|
||||
public String getExchangeRate() {
|
||||
return exchangeRate;
|
||||
}
|
||||
|
||||
public void setExchangeRate(String exchangeRate) {
|
||||
this.exchangeRate = exchangeRate;
|
||||
}
|
||||
|
||||
public String getAccNo() {
|
||||
return accNo;
|
||||
}
|
||||
|
||||
public void setAccNo(String accNo) {
|
||||
this.accNo = accNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPayType() {
|
||||
return payType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPayType(String payType) {
|
||||
this.payType = payType;
|
||||
}
|
||||
|
||||
public String getPayCardNo() {
|
||||
return payCardNo;
|
||||
}
|
||||
|
||||
public void setPayCardNo(String payCardNo) {
|
||||
this.payCardNo = payCardNo;
|
||||
}
|
||||
|
||||
public String getPayCardType() {
|
||||
return payCardType;
|
||||
}
|
||||
|
||||
public void setPayCardType(String payCardType) {
|
||||
this.payCardType = payCardType;
|
||||
}
|
||||
|
||||
public String getPayCardIssueName() {
|
||||
return payCardIssueName;
|
||||
}
|
||||
|
||||
public void setPayCardIssueName(String payCardIssueName) {
|
||||
this.payCardIssueName = payCardIssueName;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getBindId() {
|
||||
return bindId;
|
||||
}
|
||||
|
||||
public void setBindId(String bindId) {
|
||||
this.bindId = bindId;
|
||||
}
|
||||
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public String getBizType() {
|
||||
return bizType;
|
||||
}
|
||||
|
||||
public void setBizType(String bizType) {
|
||||
this.bizType = bizType;
|
||||
}
|
||||
|
||||
public String getTxnTime() {
|
||||
return txnTime;
|
||||
}
|
||||
|
||||
public void setTxnTime(String txnTime) {
|
||||
this.txnTime = txnTime;
|
||||
}
|
||||
|
||||
public BigDecimal getTxnAmt() {
|
||||
return txnAmt;
|
||||
}
|
||||
|
||||
public void setTxnAmt(BigDecimal txnAmt) {
|
||||
this.txnAmt = txnAmt;
|
||||
}
|
||||
|
||||
public String getTxnType() {
|
||||
return txnType;
|
||||
}
|
||||
|
||||
public void setTxnType(String txnType) {
|
||||
this.txnType = txnType;
|
||||
}
|
||||
|
||||
public String getTxnSubType() {
|
||||
return txnSubType;
|
||||
}
|
||||
|
||||
public void setTxnSubType(String txnSubType) {
|
||||
this.txnSubType = txnSubType;
|
||||
}
|
||||
|
||||
public String getAccessType() {
|
||||
return accessType;
|
||||
}
|
||||
|
||||
public void setAccessType(String accessType) {
|
||||
this.accessType = accessType;
|
||||
}
|
||||
|
||||
public String getReqReserved() {
|
||||
return reqReserved;
|
||||
}
|
||||
|
||||
public void setReqReserved(String reqReserved) {
|
||||
this.reqReserved = reqReserved;
|
||||
}
|
||||
|
||||
public String getMerId() {
|
||||
return merId;
|
||||
}
|
||||
|
||||
public void setMerId(String merId) {
|
||||
this.merId = merId;
|
||||
}
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getAccSplitData() {
|
||||
return accSplitData;
|
||||
}
|
||||
|
||||
public void setAccSplitData(String accSplitData) {
|
||||
this.accSplitData = accSplitData;
|
||||
}
|
||||
|
||||
public static final UnionPayMessage create(Map<String, Object> message) {
|
||||
UnionPayMessage payMessage = new JSONObject(message).toJavaObject(UnionPayMessage.class);
|
||||
payMessage.setPayMessage(message);
|
||||
return payMessage;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.egzosn.pay.common.util.MatrixToImageWriter;
|
||||
import com.egzosn.pay.common.util.Util;
|
||||
import com.egzosn.pay.common.util.sign.SignUtils;
|
||||
import com.egzosn.pay.common.util.str.StringUtils;
|
||||
import com.egzosn.pay.wx.youdian.bean.WxYoudianPayMessage;
|
||||
import com.egzosn.pay.wx.youdian.bean.YdPayError;
|
||||
import com.egzosn.pay.wx.youdian.bean.YoudianTransactionType;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -463,4 +464,15 @@ public class WxYouDianPayService extends BasePayService<WxYouDianPayConfigStorag
|
||||
return URL + type.getMethod();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建消息
|
||||
*
|
||||
* @param message 支付平台返回的消息
|
||||
* @return 支付消息对象
|
||||
*/
|
||||
@Override
|
||||
public PayMessage createMessage(Map<String, Object> message) {
|
||||
return WxYoudianPayMessage.create(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
package com.egzosn.pay.wx.youdian.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.egzosn.pay.common.bean.PayMessage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 友店回调信息
|
||||
*
|
||||
* @author egan
|
||||
* email egzosn@gmail.com
|
||||
* date 2019/7/3.20:25
|
||||
*/
|
||||
|
||||
public class WxYoudianPayMessage extends PayMessage {
|
||||
// 公众账号ID appid 是 String(32) wx8888888888888888 微信分配的公众账号ID(企业号corpid即为此appId)
|
||||
@JSONField(name = "appid")
|
||||
private String appid;
|
||||
// 商户号 mch_id 是 String(32) 1900000109 微信支付分配的商户号
|
||||
@JSONField(name = "mch_id")
|
||||
private String mchId;
|
||||
// 设备号 device_info 否 String(32) 013467007045764 微信支付分配的终端设备号,
|
||||
@JSONField(name = "device_info")
|
||||
private String deviceInfo;
|
||||
// 随机字符串 nonce_str 是 String(32) 5K8264ILTKCH16CQ2502SI8ZNMTM67VS 随机字符串,不长于32位
|
||||
@JSONField(name = "nonce_str")
|
||||
private String nonceStr;
|
||||
// 签名 sign 是 String(32) C380BEC2BFD727A4B6845133519F3AD6 签名,详见签名算法
|
||||
@JSONField(name = "sign")
|
||||
private String sign;
|
||||
// 签名类型 sign_type 否 String(32) HMAC-SHA256 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5
|
||||
@JSONField(name = "sign_type")
|
||||
private String signType;
|
||||
// 业务结果 result_code 是 String(16) SUCCESS SUCCESS/FAIL
|
||||
@JSONField(name = "result_code")
|
||||
private String resultCode;
|
||||
// 错误代码 err_code 否 String(32) SYSTEMERROR 错误返回的信息描述
|
||||
@JSONField(name = "err_code")
|
||||
private String errCode;
|
||||
// 错误代码描述 err_code_des 否 String(128) 系统错误 错误返回的信息描述
|
||||
@JSONField(name = "err_code_des")
|
||||
private String errCodeDes;
|
||||
// 用户标识 openid 是 String(128) wxd930ea5d5a258f4f 用户在商户appid下的唯一标识
|
||||
@JSONField(name = "openid")
|
||||
private String openid;
|
||||
// 是否关注公众账号 is_subscribe 是 String(1) Y 用户是否关注公众账号,Y-关注,N-未关注
|
||||
@JSONField(name = "is_subscribe")
|
||||
private String isSubscribe;
|
||||
// 交易类型 trade_type 是 String(16) JSAPI JSAPI、NATIVE、APP
|
||||
@JSONField(name = "trade_type")
|
||||
private String tradeType;
|
||||
// 付款银行 bank_type 是 String(16) CMC 银行类型,采用字符串类型的银行标识,银行类型见银行列表
|
||||
@JSONField(name = "bank_type")
|
||||
private String bankType;
|
||||
// 订单金额 total_fee 是 Int 100 订单总金额,单位为分
|
||||
@JSONField(name = "total_fee")
|
||||
private BigDecimal totalFee;
|
||||
// 应结订单金额 settlement_total_fee 否 Int 100 应结订单金额=订单金额-非充值代金券金额,应结订单金额<=订单金额。
|
||||
@JSONField(name = "settlement_total_fee")
|
||||
private BigDecimal settlementTotalFee;
|
||||
// 货币种类 fee_type 否 String(8) CNY 货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
|
||||
@JSONField(name = "fee_type")
|
||||
private String feeType;
|
||||
// 现金支付金额 cash_fee 是 Int 100 现金支付金额订单现金支付金额,详见支付金额
|
||||
@JSONField(name = "cash_fee")
|
||||
private BigDecimal cashFee;
|
||||
// 现金支付货币类型 cash_fee_type 否 String(16) CNY 货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
|
||||
@JSONField(name = "cash_fee_type")
|
||||
private String cashFeeType;
|
||||
// 总代金券金额 coupon_fee 否 Int 10 代金券金额<=订单金额,订单金额-代金券金额=现金支付金额,详见支付金额
|
||||
@JSONField(name = "coupon_fee")
|
||||
private BigDecimal couponFee;
|
||||
// 代金券使用数量 coupon_count 否 Int 1 代金券使用数量
|
||||
@JSONField(name = "coupon_count")
|
||||
private Integer couponCount;
|
||||
// 代金券类型 coupon_type_$n 否 String CASH CASH--充值代金券 NO_CASH---非充值代金券 并且订单使用了免充值券后有返回(取值:CASH、NO_CASH)。$n为下标,从0开始编号,举例:coupon_type_0
|
||||
@JSONField(name = "coupon_type_$0")
|
||||
private String couponType0;
|
||||
// 代金券ID coupon_id_$n 否 String(20) 10000 代金券ID,$n为下标,从0开始编号
|
||||
@JSONField(name = "coupon_id_$0")
|
||||
private String couponId0;
|
||||
// 单个代金券支付金额 coupon_fee_$n 否 Int 100 单个代金券支付金额,$n为下标,从0开始编号
|
||||
@JSONField(name = "coupon_fee_$0")
|
||||
private Integer couponFee0;
|
||||
// 微信支付订单号 transaction_id 是 String(32) 1217752501201407033233368018 微信支付订单号
|
||||
@JSONField(name = "transaction_id")
|
||||
private String transactionId;
|
||||
// 商户订单号 out_trade_no 是 String(32) 1212321211201407033568112322 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
// 商家数据包 attach 否 String(128) 123456 商家数据包,原样返回
|
||||
@JSONField(name = "attach")
|
||||
private String attach;
|
||||
// 支付完成时间 time_end 是 String(14) 20141030133525 支付完成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则
|
||||
@JSONField(name = "time_end", format="yyyyMMddHHmmss")
|
||||
private Date timeEnd;
|
||||
|
||||
public String getAppid() {
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getMchId() {
|
||||
return mchId;
|
||||
}
|
||||
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
|
||||
public String getDeviceInfo() {
|
||||
return deviceInfo;
|
||||
}
|
||||
|
||||
public void setDeviceInfo(String deviceInfo) {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
|
||||
public String getNonceStr() {
|
||||
return nonceStr;
|
||||
}
|
||||
|
||||
public void setNonceStr(String nonceStr) {
|
||||
this.nonceStr = nonceStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getSignType() {
|
||||
return signType;
|
||||
}
|
||||
|
||||
public void setSignType(String signType) {
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
public String getResultCode() {
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
public void setResultCode(String resultCode) {
|
||||
this.resultCode = resultCode;
|
||||
}
|
||||
|
||||
public String getErrCode() {
|
||||
return errCode;
|
||||
}
|
||||
|
||||
public void setErrCode(String errCode) {
|
||||
this.errCode = errCode;
|
||||
}
|
||||
|
||||
public String getErrCodeDes() {
|
||||
return errCodeDes;
|
||||
}
|
||||
|
||||
public void setErrCodeDes(String errCodeDes) {
|
||||
this.errCodeDes = errCodeDes;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getIsSubscribe() {
|
||||
return isSubscribe;
|
||||
}
|
||||
|
||||
public void setIsSubscribe(String isSubscribe) {
|
||||
this.isSubscribe = isSubscribe;
|
||||
}
|
||||
|
||||
public String getTradeType() {
|
||||
return tradeType;
|
||||
}
|
||||
|
||||
public void setTradeType(String tradeType) {
|
||||
this.tradeType = tradeType;
|
||||
}
|
||||
|
||||
public String getBankType() {
|
||||
return bankType;
|
||||
}
|
||||
|
||||
public void setBankType(String bankType) {
|
||||
this.bankType = bankType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getTotalFee() {
|
||||
return totalFee;
|
||||
}
|
||||
|
||||
public void setTotalFee(BigDecimal totalFee) {
|
||||
this.totalFee = totalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getSettlementTotalFee() {
|
||||
return settlementTotalFee;
|
||||
}
|
||||
|
||||
public void setSettlementTotalFee(BigDecimal settlementTotalFee) {
|
||||
this.settlementTotalFee = settlementTotalFee;
|
||||
}
|
||||
|
||||
public String getFeeType() {
|
||||
return feeType;
|
||||
}
|
||||
|
||||
public void setFeeType(String feeType) {
|
||||
this.feeType = feeType;
|
||||
}
|
||||
|
||||
public BigDecimal getCashFee() {
|
||||
return cashFee;
|
||||
}
|
||||
|
||||
public void setCashFee(BigDecimal cashFee) {
|
||||
this.cashFee = cashFee;
|
||||
}
|
||||
|
||||
public String getCashFeeType() {
|
||||
return cashFeeType;
|
||||
}
|
||||
|
||||
public void setCashFeeType(String cashFeeType) {
|
||||
this.cashFeeType = cashFeeType;
|
||||
}
|
||||
|
||||
public BigDecimal getCouponFee() {
|
||||
return couponFee;
|
||||
}
|
||||
|
||||
public void setCouponFee(BigDecimal couponFee) {
|
||||
this.couponFee = couponFee;
|
||||
}
|
||||
|
||||
public Integer getCouponCount() {
|
||||
return couponCount;
|
||||
}
|
||||
|
||||
public void setCouponCount(Integer couponCount) {
|
||||
this.couponCount = couponCount;
|
||||
}
|
||||
|
||||
public String getCouponType0() {
|
||||
return couponType0;
|
||||
}
|
||||
|
||||
public void setCouponType0(String couponType0) {
|
||||
this.couponType0 = couponType0;
|
||||
}
|
||||
|
||||
public String getCouponId0() {
|
||||
return couponId0;
|
||||
}
|
||||
|
||||
public void setCouponId0(String couponId0) {
|
||||
this.couponId0 = couponId0;
|
||||
}
|
||||
|
||||
public Integer getCouponFee0() {
|
||||
return couponFee0;
|
||||
}
|
||||
|
||||
public void setCouponFee0(Integer couponFee0) {
|
||||
this.couponFee0 = couponFee0;
|
||||
}
|
||||
|
||||
public String getTransactionId() {
|
||||
return transactionId;
|
||||
}
|
||||
|
||||
public void setTransactionId(String transactionId) {
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOutTradeNo() {
|
||||
return outTradeNo;
|
||||
}
|
||||
|
||||
public void setOutTradeNo(String outTradeNo) {
|
||||
this.outTradeNo = outTradeNo;
|
||||
}
|
||||
|
||||
public String getAttach() {
|
||||
return attach;
|
||||
}
|
||||
|
||||
public void setAttach(String attach) {
|
||||
this.attach = attach;
|
||||
}
|
||||
|
||||
public Date getTimeEnd() {
|
||||
return timeEnd;
|
||||
}
|
||||
|
||||
public void setTimeEnd(Date timeEnd) {
|
||||
this.timeEnd = timeEnd;
|
||||
}
|
||||
|
||||
public static final WxYoudianPayMessage create(Map<String, Object> message) {
|
||||
WxYoudianPayMessage payMessage = new JSONObject(message).toJavaObject(WxYoudianPayMessage.class);
|
||||
payMessage.setPayMessage(message);
|
||||
return payMessage;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.egzosn.pay.common.util.sign.SignUtils;
|
||||
import com.egzosn.pay.common.util.sign.encrypt.RSA2;
|
||||
import com.egzosn.pay.common.util.str.StringUtils;
|
||||
import com.egzosn.pay.wx.bean.WxPayError;
|
||||
import com.egzosn.pay.wx.bean.WxPayMessage;
|
||||
import com.egzosn.pay.wx.bean.WxTransactionType;
|
||||
import com.egzosn.pay.common.util.XML;
|
||||
import com.egzosn.pay.wx.bean.WxTransferType;
|
||||
@@ -753,5 +754,14 @@ public class WxPayService extends BasePayService<WxPayConfigStorage> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建消息
|
||||
*
|
||||
* @param message 支付平台返回的消息
|
||||
* @return 支付消息对象
|
||||
*/
|
||||
@Override
|
||||
public PayMessage createMessage(Map<String, Object> message) {
|
||||
return WxPayMessage.create(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
package com.egzosn.pay.wx.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.egzosn.pay.common.bean.PayMessage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信回调信息
|
||||
*
|
||||
* @author egan
|
||||
* email egzosn@gmail.com
|
||||
* date 2019/7/3.20:25
|
||||
*/
|
||||
|
||||
public class WxPayMessage extends PayMessage {
|
||||
// 公众账号ID appid 是 String(32) wx8888888888888888 微信分配的公众账号ID(企业号corpid即为此appId)
|
||||
@JSONField(name = "appid")
|
||||
private String appid;
|
||||
// 商户号 mch_id 是 String(32) 1900000109 微信支付分配的商户号
|
||||
@JSONField(name = "mch_id")
|
||||
private String mchId;
|
||||
// 设备号 device_info 否 String(32) 013467007045764 微信支付分配的终端设备号,
|
||||
@JSONField(name = "device_info")
|
||||
private String deviceInfo;
|
||||
// 随机字符串 nonce_str 是 String(32) 5K8264ILTKCH16CQ2502SI8ZNMTM67VS 随机字符串,不长于32位
|
||||
@JSONField(name = "nonce_str")
|
||||
private String nonceStr;
|
||||
// 签名 sign 是 String(32) C380BEC2BFD727A4B6845133519F3AD6 签名,详见签名算法
|
||||
@JSONField(name = "sign")
|
||||
private String sign;
|
||||
// 签名类型 sign_type 否 String(32) HMAC-SHA256 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5
|
||||
@JSONField(name = "sign_type")
|
||||
private String signType;
|
||||
// 业务结果 result_code 是 String(16) SUCCESS SUCCESS/FAIL
|
||||
@JSONField(name = "result_code")
|
||||
private String resultCode;
|
||||
// 错误代码 err_code 否 String(32) SYSTEMERROR 错误返回的信息描述
|
||||
@JSONField(name = "err_code")
|
||||
private String errCode;
|
||||
// 错误代码描述 err_code_des 否 String(128) 系统错误 错误返回的信息描述
|
||||
@JSONField(name = "err_code_des")
|
||||
private String errCodeDes;
|
||||
// 用户标识 openid 是 String(128) wxd930ea5d5a258f4f 用户在商户appid下的唯一标识
|
||||
@JSONField(name = "openid")
|
||||
private String openid;
|
||||
// 是否关注公众账号 is_subscribe 是 String(1) Y 用户是否关注公众账号,Y-关注,N-未关注
|
||||
@JSONField(name = "is_subscribe")
|
||||
private String isSubscribe;
|
||||
// 交易类型 trade_type 是 String(16) JSAPI JSAPI、NATIVE、APP
|
||||
@JSONField(name = "trade_type")
|
||||
private String tradeType;
|
||||
// 付款银行 bank_type 是 String(16) CMC 银行类型,采用字符串类型的银行标识,银行类型见银行列表
|
||||
@JSONField(name = "bank_type")
|
||||
private String bankType;
|
||||
// 订单金额 total_fee 是 Int 100 订单总金额,单位为分
|
||||
@JSONField(name = "total_fee")
|
||||
private BigDecimal totalFee;
|
||||
// 应结订单金额 settlement_total_fee 否 Int 100 应结订单金额=订单金额-非充值代金券金额,应结订单金额<=订单金额。
|
||||
@JSONField(name = "settlement_total_fee")
|
||||
private BigDecimal settlementTotalFee;
|
||||
// 货币种类 fee_type 否 String(8) CNY 货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
|
||||
@JSONField(name = "fee_type")
|
||||
private String feeType;
|
||||
// 现金支付金额 cash_fee 是 Int 100 现金支付金额订单现金支付金额,详见支付金额
|
||||
@JSONField(name = "cash_fee")
|
||||
private BigDecimal cashFee;
|
||||
// 现金支付货币类型 cash_fee_type 否 String(16) CNY 货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
|
||||
@JSONField(name = "cash_fee_type")
|
||||
private String cashFeeType;
|
||||
// 总代金券金额 coupon_fee 否 Int 10 代金券金额<=订单金额,订单金额-代金券金额=现金支付金额,详见支付金额
|
||||
@JSONField(name = "coupon_fee")
|
||||
private BigDecimal couponFee;
|
||||
// 代金券使用数量 coupon_count 否 Int 1 代金券使用数量
|
||||
@JSONField(name = "coupon_count")
|
||||
private Integer couponCount;
|
||||
// 代金券类型 coupon_type_$n 否 String CASH CASH--充值代金券 NO_CASH---非充值代金券 并且订单使用了免充值券后有返回(取值:CASH、NO_CASH)。$n为下标,从0开始编号,举例:coupon_type_0
|
||||
@JSONField(name = "coupon_type_$0")
|
||||
private String couponType0;
|
||||
// 代金券ID coupon_id_$n 否 String(20) 10000 代金券ID,$n为下标,从0开始编号
|
||||
@JSONField(name = "coupon_id_$0")
|
||||
private String couponId0;
|
||||
// 单个代金券支付金额 coupon_fee_$n 否 Int 100 单个代金券支付金额,$n为下标,从0开始编号
|
||||
@JSONField(name = "coupon_fee_$0")
|
||||
private Integer couponFee0;
|
||||
// 微信支付订单号 transaction_id 是 String(32) 1217752501201407033233368018 微信支付订单号
|
||||
@JSONField(name = "transaction_id")
|
||||
private String transactionId;
|
||||
// 商户订单号 out_trade_no 是 String(32) 1212321211201407033568112322 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
// 商家数据包 attach 否 String(128) 123456 商家数据包,原样返回
|
||||
@JSONField(name = "attach")
|
||||
private String attach;
|
||||
// 支付完成时间 time_end 是 String(14) 20141030133525 支付完成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则
|
||||
@JSONField(name = "time_end", format="yyyyMMddHHmmss")
|
||||
private Date timeEnd;
|
||||
|
||||
public String getAppid() {
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getMchId() {
|
||||
return mchId;
|
||||
}
|
||||
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
|
||||
public String getDeviceInfo() {
|
||||
return deviceInfo;
|
||||
}
|
||||
|
||||
public void setDeviceInfo(String deviceInfo) {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
|
||||
public String getNonceStr() {
|
||||
return nonceStr;
|
||||
}
|
||||
|
||||
public void setNonceStr(String nonceStr) {
|
||||
this.nonceStr = nonceStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getSignType() {
|
||||
return signType;
|
||||
}
|
||||
|
||||
public void setSignType(String signType) {
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
public String getResultCode() {
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
public void setResultCode(String resultCode) {
|
||||
this.resultCode = resultCode;
|
||||
}
|
||||
|
||||
public String getErrCode() {
|
||||
return errCode;
|
||||
}
|
||||
|
||||
public void setErrCode(String errCode) {
|
||||
this.errCode = errCode;
|
||||
}
|
||||
|
||||
public String getErrCodeDes() {
|
||||
return errCodeDes;
|
||||
}
|
||||
|
||||
public void setErrCodeDes(String errCodeDes) {
|
||||
this.errCodeDes = errCodeDes;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getIsSubscribe() {
|
||||
return isSubscribe;
|
||||
}
|
||||
|
||||
public void setIsSubscribe(String isSubscribe) {
|
||||
this.isSubscribe = isSubscribe;
|
||||
}
|
||||
|
||||
public String getTradeType() {
|
||||
return tradeType;
|
||||
}
|
||||
|
||||
public void setTradeType(String tradeType) {
|
||||
this.tradeType = tradeType;
|
||||
}
|
||||
|
||||
public String getBankType() {
|
||||
return bankType;
|
||||
}
|
||||
|
||||
public void setBankType(String bankType) {
|
||||
this.bankType = bankType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getTotalFee() {
|
||||
return totalFee;
|
||||
}
|
||||
|
||||
public void setTotalFee(BigDecimal totalFee) {
|
||||
this.totalFee = totalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getSettlementTotalFee() {
|
||||
return settlementTotalFee;
|
||||
}
|
||||
|
||||
public void setSettlementTotalFee(BigDecimal settlementTotalFee) {
|
||||
this.settlementTotalFee = settlementTotalFee;
|
||||
}
|
||||
|
||||
public String getFeeType() {
|
||||
return feeType;
|
||||
}
|
||||
|
||||
public void setFeeType(String feeType) {
|
||||
this.feeType = feeType;
|
||||
}
|
||||
|
||||
public BigDecimal getCashFee() {
|
||||
return cashFee;
|
||||
}
|
||||
|
||||
public void setCashFee(BigDecimal cashFee) {
|
||||
this.cashFee = cashFee;
|
||||
}
|
||||
|
||||
public String getCashFeeType() {
|
||||
return cashFeeType;
|
||||
}
|
||||
|
||||
public void setCashFeeType(String cashFeeType) {
|
||||
this.cashFeeType = cashFeeType;
|
||||
}
|
||||
|
||||
public BigDecimal getCouponFee() {
|
||||
return couponFee;
|
||||
}
|
||||
|
||||
public void setCouponFee(BigDecimal couponFee) {
|
||||
this.couponFee = couponFee;
|
||||
}
|
||||
|
||||
public Integer getCouponCount() {
|
||||
return couponCount;
|
||||
}
|
||||
|
||||
public void setCouponCount(Integer couponCount) {
|
||||
this.couponCount = couponCount;
|
||||
}
|
||||
|
||||
public String getCouponType0() {
|
||||
return couponType0;
|
||||
}
|
||||
|
||||
public void setCouponType0(String couponType0) {
|
||||
this.couponType0 = couponType0;
|
||||
}
|
||||
|
||||
public String getCouponId0() {
|
||||
return couponId0;
|
||||
}
|
||||
|
||||
public void setCouponId0(String couponId0) {
|
||||
this.couponId0 = couponId0;
|
||||
}
|
||||
|
||||
public Integer getCouponFee0() {
|
||||
return couponFee0;
|
||||
}
|
||||
|
||||
public void setCouponFee0(Integer couponFee0) {
|
||||
this.couponFee0 = couponFee0;
|
||||
}
|
||||
|
||||
public String getTransactionId() {
|
||||
return transactionId;
|
||||
}
|
||||
|
||||
public void setTransactionId(String transactionId) {
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOutTradeNo() {
|
||||
return outTradeNo;
|
||||
}
|
||||
|
||||
public void setOutTradeNo(String outTradeNo) {
|
||||
this.outTradeNo = outTradeNo;
|
||||
}
|
||||
|
||||
public String getAttach() {
|
||||
return attach;
|
||||
}
|
||||
|
||||
public void setAttach(String attach) {
|
||||
this.attach = attach;
|
||||
}
|
||||
|
||||
public Date getTimeEnd() {
|
||||
return timeEnd;
|
||||
}
|
||||
|
||||
public void setTimeEnd(Date timeEnd) {
|
||||
this.timeEnd = timeEnd;
|
||||
}
|
||||
|
||||
public static final WxPayMessage create(Map<String, Object> message) {
|
||||
WxPayMessage payMessage = new JSONObject(message).toJavaObject(WxPayMessage.class);
|
||||
payMessage.setPayMessage(message);
|
||||
return payMessage;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user