|
@@ -278,6 +278,7 @@ class OrderService
|
|
|
public static function findWxpay($orderId, $nbr = 0)
|
|
|
{
|
|
|
if ($nbr >= 6) {
|
|
|
+ SupportLog::channel('pay')->error("FIND_WXPAY", ['msg' => '订单查询失败','order_id'=>$orderId]);
|
|
|
throw new BusinessException("订单查询失败");
|
|
|
}
|
|
|
try {
|
|
@@ -291,6 +292,7 @@ class OrderService
|
|
|
return $result;
|
|
|
} else {
|
|
|
sleep(5);
|
|
|
+ SupportLog::channel('pay')->error("FIND_WXPAY", ['nbr' => $nbr,'order_id'=>$orderId]);
|
|
|
self::findWxpay($orderId, $nbr + 1);
|
|
|
}
|
|
|
}
|
|
@@ -308,6 +310,7 @@ class OrderService
|
|
|
public static function findAlipay($orderId, $nbr = 0)
|
|
|
{
|
|
|
if ($nbr >= 6) {
|
|
|
+ SupportLog::channel('pay')->error("FIND_ALIPAY", ['msg' => '订单查询失败','order_id'=>$orderId]);
|
|
|
throw new BusinessException("订单查询失败");
|
|
|
}
|
|
|
try {
|
|
@@ -315,13 +318,13 @@ class OrderService
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
} catch (\Exception $e) {
|
|
|
SupportLog::channel('pay')->error("FIND_ALIPAY", ['msg' => $e->getMessage()]);
|
|
|
-// throw new BusinessException("订单查询失败");
|
|
|
}
|
|
|
|
|
|
if (!empty($result['code']) && $result['code'] == '10000' && !empty($result['trade_status']) && $result['trade_status'] == 'TRADE_SUCCESS') {
|
|
|
return $result;
|
|
|
} else {
|
|
|
sleep(5);
|
|
|
+ SupportLog::channel('pay')->error("FIND_ALIPAY", ['nbr' => $nbr,'order_id'=>$orderId]);
|
|
|
self::findAlipay($orderId, $nbr + 1);
|
|
|
}
|
|
|
}
|