mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Order.php
This commit is contained in:
parent
71ebe1576e
commit
0a57431907
@ -185,9 +185,9 @@ class Order extends Auth
|
|||||||
public function payment()
|
public function payment()
|
||||||
{
|
{
|
||||||
$data = $this->_vali([
|
$data = $this->_vali([
|
||||||
'back.default' => '', #支付回跳地址
|
|
||||||
'order_no.require' => '订单单号不能为空!',
|
'order_no.require' => '订单单号不能为空!',
|
||||||
'payment_code.require' => '支付通道不能为空!',
|
'payment_code.require' => '支付通道不能为空!',
|
||||||
|
'payment_back.default' => '', # 支付回跳地址
|
||||||
]);
|
]);
|
||||||
$map = ['order_no' => $data['order_no']];
|
$map = ['order_no' => $data['order_no']];
|
||||||
$order = $this->app->db->name('ShopOrder')->where($map)->find();
|
$order = $this->app->db->name('ShopOrder')->where($map)->find();
|
||||||
@ -200,7 +200,7 @@ class Order extends Auth
|
|||||||
$openid = $this->user[UserService::TYPES[$this->type]['auth']] ?? '';
|
$openid = $this->user[UserService::TYPES[$this->type]['auth']] ?? '';
|
||||||
if (empty($openid)) $this->error("无法创建支付,未获取到OPENID");
|
if (empty($openid)) $this->error("无法创建支付,未获取到OPENID");
|
||||||
}
|
}
|
||||||
$params = PaymentService::build($data['payment_code'])->create($openid, $order['order_no'], $order['amount_total'], '商城订单支付', '', $data['back']);
|
$params = PaymentService::build($data['payment_code'])->create($openid, $order['order_no'], $order['amount_total'], '商城订单支付', '', $data['payment_back']);
|
||||||
$this->success('获取支付参数成功!', $params);
|
$this->success('获取支付参数成功!', $params);
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user