mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-04 20:57:47 +08:00
#829 优化退款结果通知类的fromXML方法
如果return_code为FAIL时,没有加密信息req_info,因此后面的加密处理会抛出异常。 因此return_code为FAIL时,直接返回结果。
This commit is contained in:
parent
66055b4a00
commit
64446f35e4
@ -46,6 +46,10 @@ public class WxPayRefundNotifyResult extends BaseWxPayResult implements Serializ
|
|||||||
*/
|
*/
|
||||||
public static WxPayRefundNotifyResult fromXML(String xmlString, String mchKey) throws WxPayException {
|
public static WxPayRefundNotifyResult fromXML(String xmlString, String mchKey) throws WxPayException {
|
||||||
WxPayRefundNotifyResult result = BaseWxPayResult.fromXML(xmlString, WxPayRefundNotifyResult.class);
|
WxPayRefundNotifyResult result = BaseWxPayResult.fromXML(xmlString, WxPayRefundNotifyResult.class);
|
||||||
|
if ("FAIL".equals(result.getReturnCode())) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
String reqInfoString = result.getReqInfoString();
|
String reqInfoString = result.getReqInfoString();
|
||||||
try {
|
try {
|
||||||
final String keyMd5String = DigestUtils.md5Hex(mchKey).toLowerCase();
|
final String keyMd5String = DigestUtils.md5Hex(mchKey).toLowerCase();
|
||||||
|
Loading…
Reference in New Issue
Block a user