mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-18 04:27:38 +08:00
修复支付宝条码付,校验问题
This commit is contained in:
@@ -90,6 +90,20 @@ public class AliPayService extends BasePayService {
|
||||
@Override
|
||||
public boolean signVerify(Map<String, Object> params, String sign) {
|
||||
|
||||
if (params instanceof JSONObject){
|
||||
for (String key : params.keySet()){
|
||||
if ("sign".equals(key)){
|
||||
continue;
|
||||
}
|
||||
TreeMap response = new TreeMap((Map) params.get(key));
|
||||
LinkedHashMap<Object, Object> linkedHashMap = new LinkedHashMap<>();
|
||||
linkedHashMap.put("code", response.remove("code") );
|
||||
linkedHashMap.put("msg", response.remove("msg") );
|
||||
linkedHashMap.putAll(response);
|
||||
return SignUtils.valueOf(payConfigStorage.getSignType()).verify(JSON.toJSONString(linkedHashMap), sign, payConfigStorage.getKeyPublic(), payConfigStorage.getInputCharset());
|
||||
}
|
||||
}
|
||||
|
||||
return SignUtils.valueOf(payConfigStorage.getSignType()).verify(params, sign, payConfigStorage.getKeyPublic(), payConfigStorage.getInputCharset());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user