|
|
@@ -159,7 +159,25 @@ class DouYinController extends BaseApiController
|
|
|
return $this->fail($e->getMessage());
|
|
|
}
|
|
|
}*/
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 拉起支付所需参数
|
|
|
+ * @return \think\response\Json
|
|
|
+ * @author liugc <466014217@qq.com>
|
|
|
+ * @date 2025/5/22 14:35
|
|
|
+ */
|
|
|
+ /*public function requestOrderData()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $params = $this->request->post();
|
|
|
+ $params['user_id'] = $this->userId;
|
|
|
+ $params['user_info'] = $this->userInfo;
|
|
|
+ $requestOrderData = DouYinService::getByteAuthorization($params['order_number']);
|
|
|
+ $requestOrderData['order_number'] = $params['order_number'];
|
|
|
+ return $this->success('',$requestOrderData);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ return $this->fail($e->getMessage());
|
|
|
+ }
|
|
|
+ }*/
|
|
|
public function submitOrderNotify()
|
|
|
{
|
|
|
try {
|
|
|
@@ -177,22 +195,21 @@ class DouYinController extends BaseApiController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 拉起支付所需参数
|
|
|
+ * 支付回调
|
|
|
* @return \think\response\Json
|
|
|
* @author liugc <466014217@qq.com>
|
|
|
* @date 2025/5/22 14:35
|
|
|
*/
|
|
|
- public function requestOrderData()
|
|
|
+ public function payNotify()
|
|
|
{
|
|
|
try {
|
|
|
$params = $this->request->post();
|
|
|
- $params['user_id'] = $this->userId;
|
|
|
- $params['user_info'] = $this->userInfo;
|
|
|
- $requestOrderData = DouYinService::getByteAuthorization($params['order_number']);
|
|
|
- $requestOrderData['order_number'] = $params['order_number'];
|
|
|
- return $this->success('',$requestOrderData);
|
|
|
+ $msg = is_array($params['msg'])?$params['msg']:json_decode($params['msg'],true);
|
|
|
+ if(DouYinService::payNotify($msg)){
|
|
|
+ return json(["err_no"=>0,"err_tips"=>"success"], 200);
|
|
|
+ }
|
|
|
} catch (\Exception $e) {
|
|
|
- return $this->fail($e->getMessage());
|
|
|
+ return json(["err_no"=>1001,"err_tips"=>$e->getMessage()], 200);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
@@ -211,25 +228,6 @@ class DouYinController extends BaseApiController
|
|
|
return $this->fail($e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
- /**
|
|
|
- * 支付回调
|
|
|
- * @return \think\response\Json
|
|
|
- * @author liugc <466014217@qq.com>
|
|
|
- * @date 2025/5/22 14:35
|
|
|
- */
|
|
|
- public function payNotify()
|
|
|
- {
|
|
|
- try {
|
|
|
- $params = $this->request->post();
|
|
|
- $msg = is_array($params['msg'])?$params['msg']:json_decode($params['msg'],true);
|
|
|
- if(DouYinService::payNotify($msg)){
|
|
|
- return json(["err_no"=>0,"err_tips"=>"success"], 200);
|
|
|
- }
|
|
|
- } catch (\Exception $e) {
|
|
|
- return json(["err_no"=>1001,"err_tips"=>$e->getMessage()], 200);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 预约
|
|
|
* @return \think\response\Json
|