fix: alinPay参数类型强转+空响应处理+错误日志增强
This commit is contained in:
+14
-14
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user