Explorar o código

话费支付回调调整

xialei hai 1 ano
pai
achega
7d1c9a49e1
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      app/controller/api/Notify.php

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

@@ -50,8 +50,7 @@ class Notify
50 50
                             try{
51 51
                                 $order_data = Db::name('order_huafei_hf') -> where('order_no', $requestId[0])->find();
52 52
                                 if($order_data['status']==1) return false;
53
-                                $pay_type = $pay_type == 1 ? 'wx' : 'al';
54
-                                Db::name('order_huafei_hf')->where('order_no',$requestId[0])->update(['rand'=>$requestId[1],'pay_type'=>1,'status'=>1]);
53
+                                Db::name('order_huafei_hf')->where('order_no',$requestId[0])->update(['rand'=>$requestId[1],'pay_type'=>$pay_type,'status'=>1]);
55 54
                             }catch (\Exception $e) {
56 55
                                 Db::name('log')->insert(['data'=>'话费充值支付回调错误:'.$e->getFile().':'.$e->getLine().'【'.$e->getMessage().'】']);
57 56
                             }
@@ -75,7 +74,7 @@ class Notify
75 74
                                         'reverse_amt' => $post_data_str['pay_amt'],
76 75
                                         'notify_url'  => env('APP_URL') . "/api/hf_notify/reverse_order",
77 76
                                     ];
78
-                                    $hf_refund_res = app()->make(StoreRefundOrderRepository::class)->payment_Reverse($refund_traits, $pay_type['pay_type'] == '1' ? 2 : 1, $pay_wx, $key);
77
+                                    $hf_refund_res = app()->make(StoreRefundOrderRepository::class)->payment_Reverse($refund_traits, $pay_type == '1' ? 2 : 1, $pay_wx, $key);
79 78
                                     Db::name('log')->insert(['data'=>'话费充值汇付支付撤销返回结果:'.json_encode($hf_refund_res)]);
80 79
                                 }
81 80
                             }catch (\Exception $e) {