xialei 1 год назад
Родитель
Сommit
30a243ab70
2 измененных файлов с 3 добавлено и 4 удалено
  1. 2 3
      app/controller/api/Notify.php
  2. 1 1
      app/controller/api/store/service/Huafei.php

+ 2 - 3
app/controller/api/Notify.php

@@ -63,10 +63,9 @@ class Notify
63
                             }
63
                             }
64
                             //话费充值支付成功推送
64
                             //话费充值支付成功推送
65
                             try{
65
                             try{
66
-                                $Huafei = new Huafei();
67
-                                $pay_wx = systemConfig('pay_wx');
68
-                                $push = $Huafei->pushHf($order_data['uid'], $order_data['order_no'], $order_data['mobile'], $order_data['pay_price']);
66
+                                $push = app()->make(Huafei::class)->pushHf($order_data['uid'], $order_data['order_no'], $order_data['mobile'], $order_data['pay_price']);
69
                                 if($push['code'] != '0000'){
67
                                 if($push['code'] != '0000'){
68
+                                    $pay_wx = systemConfig('pay_wx');
70
                                     //推送失败 给新支付的这一笔退款
69
                                     //推送失败 给新支付的这一笔退款
71
                                     Db::name('log')->insert(['data' => '给新话费充值支付的这一笔退款']);
70
                                     Db::name('log')->insert(['data' => '给新话费充值支付的这一笔退款']);
72
                                     if ($pay_wx == 3){
71
                                     if ($pay_wx == 3){

+ 1 - 1
app/controller/api/store/service/Huafei.php

@@ -243,7 +243,7 @@ class Huafei extends BaseController
243
 		$request['order_no'] = $order_sn; 
243
 		$request['order_no'] = $order_sn; 
244
 		$request['mobile'] = $phone;
244
 		$request['mobile'] = $phone;
245
 		$request['money'] = $money;
245
 		$request['money'] = $money;
246
-		$request['recharge_type'] = 1;
246
+		$request['recharge_type'] = 0;
247
 		$request['notify_url'] = 'https://api.gdjbp.com/api/huafei/notify';
247
 		$request['notify_url'] = 'https://api.gdjbp.com/api/huafei/notify';
248
 		return $this->execute('/rest/Recharge/PushOrder', $request);
248
 		return $this->execute('/rest/Recharge/PushOrder', $request);
249
 	}
249
 	}