mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
微信支付相关接口优化,支持自定义参数信息,不在默认使用配置信息
This commit is contained in:
@@ -18,7 +18,7 @@ import me.chanjar.weixin.common.util.ToStringUtils;
|
||||
* @author binarywang (https://github.com/binarywang)
|
||||
*/
|
||||
@XStreamAlias("xml")
|
||||
public class WxEntPayRequest {
|
||||
public class WxEntPayRequest extends WxPayBaseRequest{
|
||||
/**
|
||||
* <pre>
|
||||
* 公众账号appid
|
||||
@@ -58,32 +58,6 @@ public class WxEntPayRequest {
|
||||
@XStreamAlias("device_info")
|
||||
private String deviceInfo;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 随机字符串
|
||||
* nonce_str
|
||||
*是
|
||||
*5K8264ILTKCH16CQ2502SI8ZNMTM67VS
|
||||
*String(32)
|
||||
*随机字符串,不长于32位
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("nonce_str")
|
||||
private String nonceStr;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 签名
|
||||
* sign
|
||||
* 是
|
||||
* C380BEC2BFD727A4B6845133519F3AD6
|
||||
* String(32)
|
||||
*签名,详见签名算法
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("sign")
|
||||
private String sign;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 商户订单号
|
||||
@@ -178,18 +152,23 @@ public class WxEntPayRequest {
|
||||
@XStreamAlias("spbill_create_ip")
|
||||
private String spbillCreateIp;
|
||||
|
||||
public String getMchAppid() {
|
||||
|
||||
@Override
|
||||
public String getAppid() {
|
||||
return this.mchAppid;
|
||||
}
|
||||
|
||||
public void setMchAppid(String mchAppid) {
|
||||
this.mchAppid = mchAppid;
|
||||
@Override
|
||||
public void setAppid(String appid) {
|
||||
this.mchAppid = appid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMchId() {
|
||||
return this.mchId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
@@ -202,22 +181,6 @@ public class WxEntPayRequest {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
|
||||
public String getNonceStr() {
|
||||
return this.nonceStr;
|
||||
}
|
||||
|
||||
public void setNonceStr(String nonceStr) {
|
||||
this.nonceStr = nonceStr;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return this.sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getPartnerTradeNo() {
|
||||
return this.partnerTradeNo;
|
||||
}
|
||||
|
||||
@@ -20,33 +20,7 @@ import me.chanjar.weixin.common.annotation.Required;
|
||||
* Created by Binary Wang on 2016-10-08.
|
||||
*/
|
||||
@XStreamAlias("xml")
|
||||
public class WxPayRefundRequest {
|
||||
/**
|
||||
* <pre>
|
||||
* 公众账号ID
|
||||
* appid
|
||||
* 是
|
||||
* String(32)
|
||||
* wx8888888888888888
|
||||
* 微信分配的公众账号ID(企业号corpid即为此appId)
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("appid")
|
||||
private String appid;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 商户号
|
||||
* mch_id
|
||||
* 是
|
||||
* String(32)
|
||||
* 1900000109
|
||||
* 微信支付分配的商户号
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("mch_id")
|
||||
private String mchId;
|
||||
|
||||
public class WxPayRefundRequest extends WxPayBaseRequest {
|
||||
/**
|
||||
* <pre>
|
||||
* 设备号
|
||||
@@ -60,32 +34,6 @@ public class WxPayRefundRequest {
|
||||
@XStreamAlias("device_info")
|
||||
private String deviceInfo;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 随机字符串
|
||||
* nonce_str
|
||||
* 是
|
||||
* String(32)
|
||||
* 5K8264ILTKCH16CQ2502SI8ZNMTM67VS
|
||||
* 随机字符串,不长于32位。推荐随机数生成算法
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("nonce_str")
|
||||
private String nonceStr;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 签名
|
||||
* sign
|
||||
* 是
|
||||
* String(32)
|
||||
* C380BEC2BFD727A4B6845133519F3AD6
|
||||
* 签名,详见签名生成算法
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("sign")
|
||||
private String sign;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 微信订单号
|
||||
@@ -196,21 +144,7 @@ public class WxPayRefundRequest {
|
||||
@XStreamAlias("refund_account")
|
||||
private String refundAccount;
|
||||
|
||||
public String getAppid() {
|
||||
return this.appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getMchId() {
|
||||
return this.mchId;
|
||||
}
|
||||
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
|
||||
public String getDeviceInfo() {
|
||||
return this.deviceInfo;
|
||||
@@ -220,22 +154,6 @@ public class WxPayRefundRequest {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
|
||||
public String getNonceStr() {
|
||||
return this.nonceStr;
|
||||
}
|
||||
|
||||
public void setNonceStr(String nonceStr) {
|
||||
this.nonceStr = nonceStr;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return this.sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getTransactionId() {
|
||||
return this.transactionId;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
* @author binarywang (https://github.com/binarywang)
|
||||
*/
|
||||
@XStreamAlias("xml")
|
||||
public class WxPaySendRedpackRequest {
|
||||
public class WxPaySendRedpackRequest extends WxPayBaseRequest{
|
||||
/**
|
||||
* mch_billno
|
||||
* 商户订单号(每个订单号必须唯一) 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。
|
||||
@@ -90,27 +90,6 @@ public class WxPaySendRedpackRequest {
|
||||
@XStreamAlias("wxappid")
|
||||
private String wxAppid;
|
||||
|
||||
/**
|
||||
* mch_id
|
||||
* 微信支付分配的商户号
|
||||
*/
|
||||
@XStreamAlias("mch_id")
|
||||
private String mchId;
|
||||
|
||||
/**
|
||||
* nonce_str
|
||||
* 随机字符串,不长于32位
|
||||
*/
|
||||
@XStreamAlias("nonce_str")
|
||||
private String nonceStr;
|
||||
|
||||
/**
|
||||
* sign
|
||||
* 详见<a href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=4_3">签名生成算法</a>
|
||||
*/
|
||||
@XStreamAlias("sign")
|
||||
private String sign;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* scene_id
|
||||
@@ -237,36 +216,14 @@ public class WxPaySendRedpackRequest {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWxAppid() {
|
||||
@Override
|
||||
public String getAppid() {
|
||||
return this.wxAppid;
|
||||
}
|
||||
|
||||
public void setWxAppid(String wxAppid) {
|
||||
this.wxAppid = wxAppid;
|
||||
}
|
||||
|
||||
public String getMchId() {
|
||||
return this.mchId;
|
||||
}
|
||||
|
||||
public void setMchId(String mchId) {
|
||||
this.mchId = mchId;
|
||||
}
|
||||
|
||||
public String getNonceStr() {
|
||||
return this.nonceStr;
|
||||
}
|
||||
|
||||
public void setNonceStr(String nonceStr) {
|
||||
this.nonceStr = nonceStr;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return this.sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
@Override
|
||||
public void setAppid(String appid) {
|
||||
this.wxAppid = appid;
|
||||
}
|
||||
|
||||
public String getSceneId() {
|
||||
|
||||
Reference in New Issue
Block a user