|
|
@ -16,6 +16,7 @@ use core\base\BaseApiController; |
|
|
use think\db\exception\DataNotFoundException; |
|
|
use think\db\exception\DataNotFoundException; |
|
|
use think\db\exception\DbException; |
|
|
use think\db\exception\DbException; |
|
|
use think\db\exception\ModelNotFoundException; |
|
|
use think\db\exception\ModelNotFoundException; |
|
|
|
|
|
use think\facade\Log; |
|
|
use think\Response; |
|
|
use think\Response; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -94,4 +95,24 @@ class Pay extends BaseApiController |
|
|
]); |
|
|
]); |
|
|
return success('SUCCESS',(new PayService())->close($data['type'], $data['out_trade_no'])); |
|
|
return success('SUCCESS',(new PayService())->close($data['type'], $data['out_trade_no'])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取支付二维码 |
|
|
|
|
|
*/ |
|
|
|
|
|
public function getQrcode(){ |
|
|
|
|
|
$data = $this->request->params([ |
|
|
|
|
|
['trade_type', ''], |
|
|
|
|
|
['trade_id', ''], |
|
|
|
|
|
['type', ''], |
|
|
|
|
|
]); |
|
|
|
|
|
return success('SUCCESS',(new PayService())->getQrcode($data['type'], $data['trade_type'], $data['trade_id'])); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function qrcodeNotify() |
|
|
|
|
|
{ |
|
|
|
|
|
// todo |
|
|
|
|
|
Log::debug('qrcodeNotify'); |
|
|
|
|
|
Log::debug(json_encode($this->request->param())); |
|
|
|
|
|
return success('SUCCESS'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|