fix: 支付通知允许传数组内容

This commit is contained in:
邹景立 2024-09-20 15:45:06 +08:00
parent 8c0a87252c
commit 0f9023dfbf

View File

@ -98,7 +98,7 @@ class BasicWePay
*/
public function getNotify($xml = '')
{
$data = Tools::xml2arr(empty($xml) ? Tools::getRawInput() : $xml);
$data = is_array($xml) ? $xml : Tools::xml2arr(empty($xml) ? Tools::getRawInput() : $xml);
if (isset($data['sign']) && $this->getPaySign($data) === $data['sign']) {
return $data;
}