notify($channel, $type, $action); } /** * 去支付 * @return Response */ public function pay() { $data = $this->request->params([ ['type', ''], ['trade_type', ''],//业务类型 ['trade_id', ''],//业务id ['quit_url', ''], ['buyer_id', ''], ['return_url', ''], ['voucher', ''], ['openid', ''] ]); return success('SUCCESS',(new PayService())->pay($data['type'], $data['trade_type'], $data['trade_id'], $data['return_url'], $data['quit_url'], $data['buyer_id'], $data['voucher'], $data['openid'])); } public function info($trade_type, $trade_id) { $data = $this->request->params([ ['scene', ''] ]); return success((new PayService())->getInfoByTrade($trade_type, $trade_id, $data)); } /** * 获取找朋友帮忙付支付信息 * @return Response */ public function friendspayInfo($trade_type, $trade_id) { return success((new PayService())->getFriendspayInfoByTrade($trade_type, $trade_id)); } /** * 获取可用的支付方法 * @param $trade_type * @return Response * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException */ public function getPayType($trade_type){ return success((new PayService())->getPayTypeByTrade($trade_type)); } /** * 关闭支付 * @return Response */ public function close(){ $data = $this->request->params([ ['out_trade_no', ''], ['type', ''], ]); return success('SUCCESS',(new PayService())->close($data['type'], $data['out_trade_no'])); } /** * 获取支付二维码 */ public function getQrcode(){ $data = $this->request->params([ ['order_id', ''], ]); return success('SUCCESS',(new \app\service\admin\pay\PayService())->qr_order_pay($data)); } public function qrcodeNotify(int $order_id) { $data = $this->request->param(); (new PayService())->qrcodeNotify($data,$order_id); return success('SUCCESS'); } /** * 小程序支付接口 * @return Response */ public function weappPay() { $data = $this->request->params([ ['order_id', ''], ['openid', ''] ]); return success('SUCCESS', (new PayService())->weappPay($data)); } /** * 小程序支付回调 * @param int $order_id * @return Response */ public function weappNotify(int $order_id) { $data = $this->request->param(); (new PayService())->weappNotify($data, $order_id); return success('SUCCESS'); } }