mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-21 11:07:37 +08:00
#1108 微信支付结果通知类增加境外商户专有的rate_value参数
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
package com.github.binarywang.wxpay.bean.notify;
|
package com.github.binarywang.wxpay.bean.notify;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
|
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
|
||||||
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
||||||
import com.github.binarywang.wxpay.converter.WxPayOrderNotifyResultConverter;
|
import com.github.binarywang.wxpay.converter.WxPayOrderNotifyResultConverter;
|
||||||
@@ -17,8 +14,13 @@ import lombok.NoArgsConstructor;
|
|||||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付结果通用通知 ,文档见:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
|
* 支付结果通知.
|
||||||
|
* 文档见:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7&index=8
|
||||||
|
* https://pay.weixin.qq.com/wiki/doc/api/external/native.php?chapter=9_7
|
||||||
*
|
*
|
||||||
* @author aimilin6688
|
* @author aimilin6688
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
@@ -285,17 +287,29 @@ public class WxPayOrderNotifyResult extends BaseWxPayResult {
|
|||||||
*/
|
*/
|
||||||
@XStreamAlias("version")
|
@XStreamAlias("version")
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 字段名:汇率.
|
||||||
|
* 变量名:rate_value
|
||||||
|
* 类型:String(16)
|
||||||
|
* 示例值:650000000
|
||||||
|
* 标价币种与支付币种的兑换比例乘以10的8次方即为此值,例如美元兑换人民币的比例为6.5,则rate_value=650000000
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@XStreamAlias("rate_value")
|
||||||
|
private String rateValue;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
|
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
|
||||||
//防止伪造成功通知
|
//防止伪造成功通知
|
||||||
if (WxPayConstants.ResultCode.SUCCESS.equals(getReturnCode()) && getSign() == null) {
|
if (WxPayConstants.ResultCode.SUCCESS.equals(getReturnCode()) && getSign() == null) {
|
||||||
throw new WxPayException("伪造的通知!");
|
throw new WxPayException("伪造的通知!");
|
||||||
}
|
}
|
||||||
|
|
||||||
super.checkResult(wxPayService, signType, checkSuccess);
|
super.checkResult(wxPayService, signType, checkSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From xml wx pay order notify result.
|
* From xml wx pay order notify result.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user