Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Gateways/Alipay/AliBaseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private function getBaseData(string $method, array $bizContent)
// 'app_auth_token' => '', // 暂时不用
'biz_content' => json_encode($bizContent, JSON_UNESCAPED_UNICODE),
];
$requestData = ArrayUtil::paraFilter($requestData);
$requestData = ArrayUtil::paraFilter($requestData); //支付宝签名对于空值会抛弃
return ArrayUtil::arraySort($requestData);
}

Expand Down
8 changes: 4 additions & 4 deletions src/Helpers/ArrayUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ public static function createLinkString($para)
if (is_array($val)) {
continue;
}

$arg .= $key . '=' . urldecode($val) . '&';
}
//去掉最后一个&字符
$arg && $arg = substr($arg, 0, -1);

//如果存在转义字符,那么去掉转义
if (get_magic_quotes_gpc()) {
$arg = stripslashes($arg);
}
//php7.4 废弃了get_magic_quotes_gpc
// if (get_magic_quotes_gpc()) {
// $arg = stripslashes($arg);
// }

return $arg;
}
Expand Down