|
@@ -339,7 +339,20 @@ class Pay extends Base
|
|
|
* @ApiReturn (重定向到支付宝支付网页)
|
|
|
*
|
|
|
*/
|
|
|
- public function alipay()
|
|
|
+ public function alipay(){
|
|
|
+ Hook::add('paid_success', 'addons\\unishop\\behavior\\Order');
|
|
|
+
|
|
|
+ $orderId = $this->request->request('order_id', 0);
|
|
|
+ $orderId = Hashids::decodeHex($orderId);
|
|
|
+
|
|
|
+ $orderModel = new \addons\unishop\model\Order();
|
|
|
+ $order = $orderModel->where(['id' => $orderId])->find();
|
|
|
+
|
|
|
+ Hook::listen('paid_success', $order, ['pay_type' => \addons\unishop\model\Order::PAY_ALIPAY]);
|
|
|
+
|
|
|
+ $this->success('支付成功', []);
|
|
|
+ }
|
|
|
+ public function alipay_old()
|
|
|
{
|
|
|
$this->error('暂不支持支付宝');
|
|
|
$orderId = $this->request->request('order_id', 0);
|