Skip to content

签名验证失败public boolean checkSign(Object xmlBean)方法的bug #250

@jiangyang118

Description

@jiangyang118

|wxJsYyPaymentPlugin verifyNotify error, valid failed|notifyResult={"appid":"**************","attach":null,"bankType":"ICBC_DEBIT","cashFee":157390,"cashFeeType":null,"couponCount":1,"couponFee":10,"couponList":[{"couponFee":10,"couponId":"2000000000472570000","couponType":null}],"deviceInfo":null,"errCode":null,"errCodeDes":null,"feeType":"CNY","isSubscribe":"N","mchId":"1403272402","nonceStr":"1497351146318","openid":"oeDfdwTwwZQ_cBhnmNDpjR0lTEF4","outTradeNo":"2017061342100429","resultCode":"SUCCESS","returnCode":"SUCCESS","returnMsg":null,"settlementTotalFee":null,"sign":"EA5C0AF580CFCF7708C8C168C2261B42","timeEnd":"20170613185233","totalFee":157400,"tradeType":"JSAPI","transactionId":"4003522001201706135577210346","xmlString":"<xml><appid><![CDATA[**************]]></appid><bank_type><![CDATA[ICBC_DEBIT]]></bank_type><cash_fee><![CDATA[157390]]></cash_fee><coupon_count><![CDATA[1]]></coupon_count><coupon_fee>10</coupon_fee><coupon_fee_0><![CDATA[10]]></coupon_fee_0><coupon_id_0><![CDATA[2000000000472570000]]></coupon_id_0><fee_type><![CDATA[CNY]]></fee_type><is_subscribe><![CDATA[N]]></is_subscribe><mch_id><![CDATA[1403272402]]></mch_id><nonce_str><![CDATA[1497351146318]]></nonce_str><openid><![CDATA[oeDfdwTwwZQ_cBhnmNDpjR0lTEF4]]></openid><out_trade_no><![CDATA[2017061342100429]]></out_trade_no><result_code><![CDATA[SUCCESS]]></result_code><return_code><![CDATA[SUCCESS]]></return_code><sign><![CDATA[EA5C0AF580CFCF7708C8C168C2261B42]]></sign><time_end><![CDATA[20170613185233]]></time_end><total_fee>157400</total_fee><trade_type><![CDATA[JSAPI]]></trade_type><transaction_id><![CDATA[4003522001201706135577210346]]></transaction_id></xml>"}

针对使用优惠劵的情况,xml中的coupon_id_0没法映射回来。针对上面的代码串,只能映射成WxPayOrderNotifyResult类中的couponList中的couponId,而couponId配置的注解是@XStreamAlias("coupon_id"),无法转成coupon_id_0导致签名验证失败。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions