|
@@ -218,6 +218,7 @@ class OrderService
|
|
|
try {
|
|
|
// Pay::wechat(config('payment.wxpay'))->pos($payData);
|
|
|
$result = self::findWxpay('OD20240816110857N900IC', 0);
|
|
|
+ dump("微信返回",$result);
|
|
|
} catch (\Exception $e) {
|
|
|
$log->error("WXPAY", ['msg' => $e->getMessage()]);
|
|
|
throw new BusinessException("支付失败");
|
|
@@ -265,12 +266,9 @@ class OrderService
|
|
|
throw new BusinessException("订单查询失败");
|
|
|
}
|
|
|
try {
|
|
|
- if($nbr > 2) {
|
|
|
- $result = Pay::wechat(config('payment.wxpay'))->find($orderId, 'pos');
|
|
|
- $result = json_decode(json_encode($result), true);
|
|
|
- }
|
|
|
+ $result = Pay::wechat(config('payment.wxpay'))->find($orderId, 'pos');
|
|
|
+ $result = json_decode(json_encode($result), true);
|
|
|
} catch (\Exception $e) {
|
|
|
- dump($e->getMessage());
|
|
|
SupportLog::channel('pay')->error("WXPAY", ['msg' => $e->getMessage()]);
|
|
|
throw new BusinessException("订单查询失败");
|
|
|
}
|
|
@@ -278,7 +276,6 @@ class OrderService
|
|
|
if (!empty($result['return_code']) && $result['return_code'] == 'SUCCESS' && !empty($result['result_code']) && $result['result_code'] == 'SUCCESS') {
|
|
|
return $result;
|
|
|
} else {
|
|
|
- dump("睡:".$nbr);
|
|
|
sleep(5);
|
|
|
self::findWxpay($orderId, $nbr + 1);
|
|
|
}
|