|
@@ -387,17 +387,6 @@ class OrdersController extends BaseController
|
|
|
return response()->pagination(new ChargeListTransformer(), $res);
|
|
|
}
|
|
|
|
|
|
- //订单是否成功
|
|
|
- public function isSuccess(Request $request)
|
|
|
- {
|
|
|
- $order = $request->input('order');
|
|
|
- $order_info = OrderService::getByTradeNo($order);
|
|
|
- if ($order_info && $order_info->status == 'PAID') {
|
|
|
- return response()->success();
|
|
|
- }
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
private function getPayParams(Request $request)
|
|
|
{
|
|
@@ -596,25 +585,10 @@ class OrdersController extends BaseController
|
|
|
*/
|
|
|
public function checkOrder(Request $request)
|
|
|
{
|
|
|
- $order = $request->input('order', '');
|
|
|
- $i = 0;
|
|
|
- $uid = $this->uid;
|
|
|
- while ($i <= 10) {
|
|
|
- $order_info = OrderService::getByTradeNo($order);
|
|
|
- if (!$order_info) {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- break;
|
|
|
- }
|
|
|
- if (isset($order_info->status) && $order_info->status == 'PAID') {
|
|
|
- $data['balance'] = 0;
|
|
|
- $user = UserService::getById($uid);
|
|
|
- if ($user) {
|
|
|
- $data['balance'] = $user->balance;
|
|
|
- }
|
|
|
- return response()->success($data);
|
|
|
- }
|
|
|
- sleep(1);
|
|
|
- $i++;
|
|
|
+ $order = $request->input('order');
|
|
|
+ $order_info = OrderService::getByTradeNo($order);
|
|
|
+ if ($order_info && $order_info->status == 'PAID') {
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
return response()->error('QAPP_SYS_ERROR');
|
|
|
}
|