|
@@ -10,6 +10,7 @@ |
|
@@ -10,6 +10,7 @@ |
10
|
// +----------------------------------------------------------------------
|
10
|
// +----------------------------------------------------------------------
|
11
|
namespace app\portal\controller;
|
11
|
namespace app\portal\controller;
|
12
|
//use cmf\controller\HomeBaseController;
|
12
|
//use cmf\controller\HomeBaseController;
|
|
|
13
|
+use api\portal\model\OrderModel;
|
13
|
use app\portal\model\MemberModel;
|
14
|
use app\portal\model\MemberModel;
|
14
|
use app\portal\model\UserModel;
|
15
|
use app\portal\model\UserModel;
|
15
|
use app\portal\service\PostService;
|
16
|
use app\portal\service\PostService;
|
|
@@ -113,5 +114,23 @@ class IndexController extends CommonController |
|
@@ -113,5 +114,23 @@ class IndexController extends CommonController |
113
|
\QRcode::png($url);
|
114
|
\QRcode::png($url);
|
114
|
}
|
115
|
}
|
115
|
|
116
|
|
|
|
117
|
+ // 检测微信支付是否完成
|
|
|
118
|
+ public function checkStatus() {
|
|
|
119
|
+ if($this->request->isAjax()) {
|
|
|
120
|
+ $order_sn = $this->request->param('order_sn');
|
|
|
121
|
+ $order_model = new OrderModel();
|
|
|
122
|
+ $status = $order_model->where(['order_sn'=>$order_sn])->value('status');
|
|
|
123
|
+ if(empty($status)) {
|
|
|
124
|
+ $this->apiResponse(0,'订单不存在');
|
|
|
125
|
+ }
|
|
|
126
|
+ if($status == 1 || $status == 9) {
|
|
|
127
|
+ $this->apiResponse(0,'未支付成功');
|
|
|
128
|
+ }
|
|
|
129
|
+ if($status == 2) {
|
|
|
130
|
+ $this->apiResponse(1,'支付成功');
|
|
|
131
|
+ }
|
|
|
132
|
+ }
|
|
|
133
|
+ }
|
|
|
134
|
+
|
116
|
|
135
|
|
117
|
} |
136
|
} |