Browse Source

pay alert

zz 6 năm trước cách đây
mục cha
commit
2d638287ff
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      app/Http/Controllers/Wap/Pay/OrdersController.php

+ 7 - 0
app/Http/Controllers/Wap/Pay/OrdersController.php

@@ -1614,6 +1614,13 @@ class OrdersController extends Controller
                 $template_type = 'pay_channel_change';
                 $param = ['pay_id' => $pay_merchant_id, 'new_pay_id' => $change_pay_id];
             }
+
+            $last_alert_time = Redis::hget('autopayalert',$pay_merchant_id);
+            if($last_alert_time && (time() -$last_alert_time) <= 10 ){
+                return ;
+            }
+
+            Redis::hset('autopayalert',$pay_merchant_id,time());
             foreach ($phone_arr as $phone) {
                 AliSMS::send($phone, $template_type, $param);
             }