Authored by 郝肖肖

payParams 判断变量是否存在

... ... @@ -54,7 +54,7 @@ const Alibank = {
};
},
notify(data, param) {
let payParams = JSON.parse(param.payParams);
let payParams = param.payParams && JSON.parse(param.payParams) || {};
let orderCode = parseInt(data.out_trade_no, 10);
let extraParam = data.extra_common_param && JSON.parse(data.extra_common_param) || {};
let bankName = payHelpersBank.getList()[extraParam.defaultbank] &&
... ... @@ -82,6 +82,10 @@ const Alibank = {
checkNotify(data, payParams) {
let signValue = data.sign;
if (!payParams || !data) {
return false;
}
delete data.sign;
delete data.sign_type;
delete data.code;
... ...