|
@@ -53,30 +53,7 @@ class Buy extends Base
|
|
|
|
|
|
return $info;
|
|
return $info;
|
|
}
|
|
}
|
|
-
|
|
|
|
- # 检测是否支付成功
|
|
|
|
- public function checkOrder()
|
|
|
|
- {
|
|
|
|
- $buy_id = Dever::input('buy_id');
|
|
|
|
- $order_id = Dever::input('order_id');
|
|
|
|
-
|
|
|
|
- if ($order_id) {
|
|
|
|
- $info = Dever::db('vip/order')->one($order_id);
|
|
|
|
- if ($info) {
|
|
|
|
- if ($info['status'] == 2) {
|
|
|
|
- # 已支付
|
|
|
|
- $url = $this->url('success', array('buy_id' => $buy_id, 'order_id' => $order_id), 'vip');
|
|
|
|
- Dever::location($url);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- # 未支付
|
|
|
|
- $url = $this->url('pay', array('buy_id' => $buy_id, 'open' => 2), 'vip');
|
|
|
|
- Dever::location($url);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
# 购买页
|
|
# 购买页
|
|
public function buy()
|
|
public function buy()
|
|
{
|
|
{
|
|
@@ -171,7 +148,7 @@ class Buy extends Base
|
|
|
|
|
|
//$param参数
|
|
//$param参数
|
|
//$refer = $this->url('success', array('buy_id' => $buy_id, 'order_id' => $id), 'vip');
|
|
//$refer = $this->url('success', array('buy_id' => $buy_id, 'order_id' => $id), 'vip');
|
|
- $refer = $this->url('data.checkOrder', array('buy_id' => $buy_id, 'order_id' => $id), 'vip');
|
|
|
|
|
|
+ $refer = $this->url('api.checkOrder', array('buy_id' => $buy_id, 'order_id' => $id), 'vip');
|
|
$param = array
|
|
$param = array
|
|
(
|
|
(
|
|
'account_id' => 2,
|
|
'account_id' => 2,
|