input('order_pay_id')); //$orderPay = OrderPay::find(58420); $orderPay = OrderPay::where('id', $pay_id)->with(['orders'])->first(); if (!$orderPay) { throw new AppException('支付记录不存在'); } $data = (new PayPageService)->mergePayPage($orderPay); return $this->successJson('pay success', $data); } public function goodsPage() { $order_id = intval(request()->input('order_id')); $order = Order::find($order_id); //837、895、789、737、940 if (!$order) { throw new AppException('订单记录不存在'); } $data = (new PayPageService())->goodsPaging($order); return $this->successJson('list', $data); } protected function getPayType($sn) { if (!empty($sn)) { $tag = substr($sn, 0, 2); return $tag; } return ''; } }