params = request()->input(); if (!isset($this->params['order_id'])) { return $this->errorJson('order_id 不能为空!'); } $this->order = app('OrderManager')->make('Order')->find($this->params['order_id']); if (!isset($this->order)) { return $this->errorJson('未找到该订单!'); } } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function pay() { OrderService::orderPay($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function cancelPay() { OrderService::orderCancelPay($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function send() { OrderService::orderSend($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function cancelSend() { OrderService::orderCancelSend($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function Receive() { OrderService::orderReceive($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function Delete() { OrderService::orderDelete($this->params); return $this->successJson(); } /** * @return \Illuminate\Http\JsonResponse * @throws \app\common\exceptions\AppException */ public function Close() { OrderService::orderClose($this->params); $ingress = \Yunshop::request()->ingress; $type = \Yunshop::request()->type; // if ($ingress == 'weChatApplet' && $type == 2){ // $order = Order::find(\Yunshop::request()->orderId); // (new MiniMessageService($order,'',2,'订单取消通知'))->received(); // } return $this->successJson(); } }