diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index dca5a34b..de0a92a8 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -3227,6 +3227,43 @@ class UserController extends BaseController exit; } + /** + * 订单状态 + */ + public function order_status() { + + $request = json_decode(base64_decode(file_get_contents("php://input")), true); + if (I("debug")) { + $request['orderno'] = "SP_20191105154135nTcz"; + } + if (!$request['orderno']) return ; + + $pay_where = substr($orderno, 0, 2); + $map['pay_order_number'] = $orderno; + + switch ($pay_where) { + case 'SP' : + $result = M('Spend', 'tab_')->field("*")->where($map)->find(); + break; + case 'PF' : + $result = M('deposit', 'tab_')->field('*')->where($map)->find(); + break; + case 'TB' : + $result = M('balance', 'tab_')->field('*')->where($map)->find(); + break; + case 'BR' : + $result = M('bind_recharge', 'tab_')->field('*')->where($map)->find(); + break; + } + // 支付成功跳转页面 + if ($result['pay_status'] == 1) { + $this->new_set_message(200, "支付成功"); + // $this->success("支付成功", U("userH/get_user_money", ['user_token' => $userToken])); + } else { + $this->new_set_message(0, "支付失败"); + } + + } }