fix: alinPay参数类型强转+空响应处理+错误日志增强

This commit is contained in:
li
2026-03-13 00:27:44 +08:00
parent 81869255c1
commit dfd9f37253
2 changed files with 25 additions and 18 deletions
+14 -14
View File
@@ -148,13 +148,13 @@ class AlinPay
public function createOrder($orderNo, $amount, $notifyUrl, $desc = '')
{
$params = [
'app_id' => $this->config['app_id'],
'product_id' => $this->config['collection_product_id'], // 代收 product_id=11
'out_trade_no' => $orderNo,
'notify_url' => $notifyUrl,
'amount' => $amount,
'time' => time(),
'desc' => $desc,
'app_id' => strval($this->config['app_id']),
'product_id' => strval($this->config['collection_product_id']), // 代收 product_id=11
'out_trade_no' => strval($orderNo),
'notify_url' => strval($notifyUrl),
'amount' => strval($amount),
'time' => intval(time()),
'desc' => strval($desc),
];
$params['sign'] = $this->generateSign($params);
@@ -199,13 +199,13 @@ class AlinPay
public function createPayment($orderNo, $amount, $accountName, $accountNumber, $bankCode, $bankName, $notifyUrl, $desc = '')
{
$params = [
'app_id' => $this->config['app_id'],
'product_id' => $this->config['payment_product_id'], // 代付 product_id=14
'out_trade_no' => $orderNo,
'notify_url' => $notifyUrl,
'amount' => $amount,
'time' => time(),
'desc' => $desc,
'app_id' => strval($this->config['app_id']),
'product_id' => strval($this->config['payment_product_id']), // 代付 product_id=14
'out_trade_no' => strval($orderNo),
'notify_url' => strval($notifyUrl),
'amount' => strval($amount),
'time' => intval(time()),
'desc' => strval($desc),
];
$params['sign'] = $this->generateSign($params);