Bladeren bron

佣金结算-代码撤回-牵连东西太多-节后再搞

sunxbiao 5 maanden geleden
bovenliggende
commit
d2b0e7af1a
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      app/common/repositories/store/order/StoreRefundOrderRepository.php

+ 4 - 2
app/common/repositories/store/order/StoreRefundOrderRepository.php

@@ -31,6 +31,7 @@ use FormBuilder\Factory\Elm;
31
 use think\Exception;
31
 use think\Exception;
32
 use think\exception\ValidateException;
32
 use think\exception\ValidateException;
33
 use think\facade\Db;
33
 use think\facade\Db;
34
+use think\facade\Log;
34
 use think\facade\Queue;
35
 use think\facade\Queue;
35
 use think\facade\Route;
36
 use think\facade\Route;
36
 use Alipay\AopClient;
37
 use Alipay\AopClient;
@@ -1188,8 +1189,9 @@ class StoreRefundOrderRepository extends BaseRepository
1188
                     'notify_url' => env('APP_URL')."/api/hf_notify/notify_order",
1189
                     'notify_url' => env('APP_URL')."/api/hf_notify/notify_order",
1189
                 ];
1190
                 ];
1190
                 $hf_refund_res = $this->Payment_refund_traits($refund_traits,$key,$group_order['pay_wx']);
1191
                 $hf_refund_res = $this->Payment_refund_traits($refund_traits,$key,$group_order['pay_wx']);
1191
-                Db::name('log')->insert(['data'=>'汇付退款返回结果:'.json_encode($hf_refund_res)]);
1192
-                if($hf_refund_res['status'] == 'failed'){
1192
+                Db::name('log')->insert(['data' => '汇付退款返回结果(' . $group_order['group_order_sn'] . '):' . json_encode($hf_refund_res)]);
1193
+                if($hf_refund_res['status'] ?? '' == 'failed'){
1194
+                    Log::error('汇付退款返回结果(' . $group_order['group_order_sn'] . '):' . json_encode($hf_refund_res));
1193
                     throw new ValidateException('退款失败11');
1195
                     throw new ValidateException('退款失败11');
1194
                 }
1196
                 }
1195
 
1197