Переглянути джерело

Merge branch 'master' of qk:wangdu/wangdu_public_api

zhoulj 4 роки тому
батько
коміт
6ff7fc55e4

+ 2 - 11
app/Console/Commands/FailOrderAlertV2.php

@@ -76,7 +76,7 @@ class FailOrderAlertV2 extends Command
                 $unpaid_num = isset($pay_info['unpaid_num']) ?  (int)$pay_info['unpaid_num'] : 0;
                 $last_create_time = isset($pay_info['last_create_time']) ?  (int)$pay_info['last_create_time'] : 0;
 
-                $order_num = 20;
+                $order_num = 10;
                 if($unpaid_num  >= $order_num)//超过30条都是失败订单报警
                 {
                     $is_need_alert = true;
@@ -99,6 +99,7 @@ class FailOrderAlertV2 extends Command
                         $param = ['pay_id'=>$pay_id,'new_pay_id' => $back_pay->id];
                         foreach ($phone_arr as $phone){
                             $this->sendSms($phone, 'pay_channel_change',$param);
+                            $this->sendSms($phone, 'order_remind',$param);
                         }
 
                     }else{
@@ -109,16 +110,6 @@ class FailOrderAlertV2 extends Command
                     }
                 }
 
-                /*if(in_array($pay_id,[41,43,46])  && $last_create_time && ($ntime - $last_create_time) > $time_str)
-                {
-                    $is_need_alert = true;
-                    $content = '支付通道: '.$pay_id.' ,最近'.$time_str.'秒内没有产生一条订单,尽快排查';
-                    $template_type = 'order_halfhour_remind';
-                    $param = ['pay_id'=>$pay_id];
-                    foreach ($phone_arr as $phone){
-                        $this->sendSms($phone, $template_type,$param);
-                    }
-                }*/
                 if(isset($alert_time_diff[$pay_id])  && $last_create_time && ($ntime - $last_create_time) > $alert_time_diff[$pay_id] ){
                     $is_need_alert = true;
                     $content = '支付通道: '.$pay_id.' ,最近'.$time_str.'秒内没有产生一条订单,尽快排查';

+ 1 - 1
app/Console/Kernel.php

@@ -207,7 +207,7 @@ class Kernel extends ConsoleKernel
         $schedule->command('generate_order_stat')->dailyAt("00:25");
 
         //订单预警
-//         $schedule->command('foav2')->everyMinute();
+         $schedule->command('foav2')->everyMinute();
 
         //异步签到插入
         $schedule->command('AsyncUserSign')->everyMinute();

+ 7 - 6
app/Libs/Pay/SandPay.php

@@ -9,15 +9,16 @@ class SandPay
 {
     const API_HOST = 'https://caspay.sandpay.com.cn/agent-main/openapi/';
     const API_TEST_HOST = 'http://61.129.71.103:7970/agent-main/openapi/';
-    const PUB_KEY_PATH = 'cert/sandpay/sand.cer'; //公钥文件
-    const PRI_KEY_PATH = 'cert/sandpay/vPvWnHjBeQhHLebn.pfx'; //私钥文件
-    const CERT_PWD = 'vPvWnHjBeQhHLebn'; //私钥证书密码
-    const MER_ID = '6888804025954';
-    const NOTIFY_HOST = 'http://116.62.175.234/';
+    const NOTIFY_HOST = 'http://116.62.175.234:8094/';
     const NOTIFY_TEST_HOST = 'http://managepre.aizhuishu.com/';
     const PUB_PRODUCT_ID = '00000003'; //代付对公:00000003
     const PRI_PRODUCT_ID = '00000004'; //代付对私:00000004
 
+    const PUB_KEY_PATH = 'cert/sandpay-finance/sand.cer'; //公钥文件
+    const PRI_KEY_PATH = 'cert/sandpay-finance/vPvWnHjBeQhHLebn.pfx'; //私钥文件
+    const CERT_PWD = 'vPvWnHjBeQhHLebn'; //私钥证书密码
+    const MER_ID = '6888804025954';
+
     private $notify_url;
     private $agentpay_url;
     private $query_balance_url;
@@ -282,7 +283,7 @@ class SandPay
             $file = file_get_contents($path);
             if (!$file) {
                 throw new Exception('loadPk12Cert::file
-					_get_contents');
+                    _get_contents');
             }
 
             if (!openssl_pkcs12_read($file, $cert, $pwd)) {