|
|
@@ -20,12 +20,6 @@ class Huafei extends BaseController
|
|
20
|
20
|
protected $apiVersion = "1.0";
|
|
21
|
21
|
|
|
22
|
22
|
|
|
23
|
|
- public function __construct(App $app)
|
|
24
|
|
- {
|
|
25
|
|
- parent::__construct($app);
|
|
26
|
|
- }
|
|
27
|
|
-
|
|
28
|
|
-
|
|
29
|
23
|
//充值话费回调
|
|
30
|
24
|
public function notify(){
|
|
31
|
25
|
$param = $this->request->param();
|
|
|
@@ -106,38 +100,42 @@ class Huafei extends BaseController
|
|
106
|
100
|
}else{
|
|
107
|
101
|
return app('json')->fail('创建话费充值预支付订单失败');
|
|
108
|
102
|
}
|
|
109
|
|
-
|
|
110
|
|
- //推送订单
|
|
111
|
|
- // $push = $this->pushOrder($order_sn, $params['phone'], $params['money']);
|
|
112
|
|
- // if($push['code'] == '0000'){
|
|
113
|
|
- // //入库记录
|
|
114
|
|
- // $insertdata = [
|
|
115
|
|
- // 'uid'=> $uid,
|
|
116
|
|
- // 'mobile' => $params['phone'],
|
|
117
|
|
- // 'commission'=> 0,
|
|
118
|
|
- // 'commission_share'=> 0.04,
|
|
119
|
|
- // 'order_number' => $push['data']['order_number'],
|
|
120
|
|
- // 'order_sn' => $order_sn,
|
|
121
|
|
- // 'amount_price' => $push['data']['amount'],
|
|
122
|
|
- // 'fanli_price' => $push['data']['fanli'],
|
|
123
|
|
- // 'cost_price' => $push['data']['cost_price'],
|
|
124
|
|
- // 'pay_money' => $params['money'],
|
|
125
|
|
- // 'status' => 0,
|
|
126
|
|
- // 'create_time' => time(),
|
|
127
|
|
- // 'finish_time' => time(),
|
|
128
|
|
- // 'modify_time' => time(),
|
|
129
|
|
- // ];
|
|
130
|
|
- // Db::name('order_huafei')->insert($insertdata);
|
|
131
|
|
- // return app('json')->success('话费推送成功', $push);
|
|
132
|
|
- // }else{
|
|
133
|
|
- // return app('json')->fail($push['msg']);
|
|
134
|
|
- // }
|
|
135
|
103
|
}else{
|
|
136
|
104
|
return app('json')->fail($verify['msg']);
|
|
137
|
105
|
}
|
|
138
|
106
|
}
|
|
139
|
107
|
|
|
140
|
108
|
|
|
|
109
|
+ //话费充值推送
|
|
|
110
|
+ public function pushHf($uid, $order_sn, $phone, $money){
|
|
|
111
|
+ //推送订单
|
|
|
112
|
+ $push = $this->pushOrder($order_sn, $phone, $money);
|
|
|
113
|
+ if($push['code'] == '0000'){
|
|
|
114
|
+ //入库记录
|
|
|
115
|
+ $insertdata = [
|
|
|
116
|
+ 'uid'=> $uid,
|
|
|
117
|
+ 'mobile' => $phone,
|
|
|
118
|
+ 'commission'=> 0,
|
|
|
119
|
+ 'commission_share'=> 0.04,
|
|
|
120
|
+ 'order_number' => $push['data']['order_number'],
|
|
|
121
|
+ 'order_sn' => $order_sn,
|
|
|
122
|
+ 'amount_price' => $push['data']['amount'],
|
|
|
123
|
+ 'fanli_price' => $push['data']['fanli'],
|
|
|
124
|
+ 'cost_price' => $push['data']['cost_price'],
|
|
|
125
|
+ 'pay_money' => $money,
|
|
|
126
|
+ 'status' => 0,
|
|
|
127
|
+ 'create_time' => time(),
|
|
|
128
|
+ 'finish_time' => time(),
|
|
|
129
|
+ 'modify_time' => time(),
|
|
|
130
|
+ ];
|
|
|
131
|
+ Db::name('order_huafei')->insert($insertdata);
|
|
|
132
|
+ return $push;
|
|
|
133
|
+ }else{
|
|
|
134
|
+ return false;
|
|
|
135
|
+ }
|
|
|
136
|
+ }
|
|
|
137
|
+
|
|
|
138
|
+
|
|
141
|
139
|
|
|
142
|
140
|
//话费充值记录
|
|
143
|
141
|
public function record(){
|