Skip to content

Commit 113407a

Browse files
committed
#1108 微信支付结果通知类增加境外商户专有的rate_value参数
1 parent 4ae6c43 commit 113407a

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/WxPayOrderNotifyResult.java

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package com.github.binarywang.wxpay.bean.notify;
22

3-
import java.util.List;
4-
import java.util.Map;
5-
63
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
74
import com.github.binarywang.wxpay.constant.WxPayConstants;
85
import com.github.binarywang.wxpay.converter.WxPayOrderNotifyResultConverter;
@@ -17,8 +14,13 @@
1714
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
1815
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
1916

17+
import java.util.List;
18+
import java.util.Map;
19+
2020
/**
21-
* 支付结果通用通知 ,文档见:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
21+
* 支付结果通知.
22+
* 文档见:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7&index=8
23+
* https://pay.weixin.qq.com/wiki/doc/api/external/native.php?chapter=9_7
2224
*
2325
* @author aimilin6688
2426
* @since 2.5.0
@@ -285,17 +287,29 @@ public class WxPayOrderNotifyResult extends BaseWxPayResult {
285287
*/
286288
@XStreamAlias("version")
287289
private String version;
288-
290+
291+
/**
292+
* <pre>
293+
* 字段名:汇率.
294+
* 变量名:rate_value
295+
* 类型:String(16)
296+
* 示例值:650000000
297+
* 标价币种与支付币种的兑换比例乘以10的8次方即为此值,例如美元兑换人民币的比例为6.5,则rate_value=650000000
298+
* </pre>
299+
*/
300+
@XStreamAlias("rate_value")
301+
private String rateValue;
302+
289303
@Override
290304
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
291305
//防止伪造成功通知
292306
if (WxPayConstants.ResultCode.SUCCESS.equals(getReturnCode()) && getSign() == null) {
293307
throw new WxPayException("伪造的通知!");
294308
}
295-
309+
296310
super.checkResult(wxPayService, signType, checkSuccess);
297311
}
298-
312+
299313
/**
300314
* From xml wx pay order notify result.
301315
*

0 commit comments

Comments
 (0)