|
|
@@ -1,5 +1,6 @@
|
|
|
<?php
|
|
|
declare(strict_types=1);
|
|
|
+
|
|
|
namespace SixShop\Wechat\Service;
|
|
|
|
|
|
use SixShop\Wechat\Entity\WechatDeliveryEntity;
|
|
|
@@ -22,7 +23,7 @@ class ExpressService
|
|
|
if ($result->isEmpty()) {
|
|
|
$response = $this->miniApp->getClient()->get('/cgi-bin/express/business/delivery/getall');
|
|
|
if ($response->isFailed()) {
|
|
|
- Log::error('获取所有快递公司失败'.json_encode($response->toArray()));
|
|
|
+ Log::error('获取所有快递公司失败' . json_encode($response->toArray()));
|
|
|
throw_logic_exception('获取所有快递公司失败');
|
|
|
}
|
|
|
$result = $response->toArray();
|
|
|
@@ -42,8 +43,9 @@ class ExpressService
|
|
|
'transaction_id' => $transactionID,
|
|
|
]);
|
|
|
if ($response->isFailed()) {
|
|
|
- Log::error('查询订单发货状态失败{transaction_id}{response}', ['transaction_id' => $transactionID, 'response' => $response->toArray()]);
|
|
|
- throw_logic_exception('查询订单发货状态失败');
|
|
|
+ $responseData = $response->toArray();
|
|
|
+ Log::error('查询订单发货状态失败{transaction_id}{response}', ['transaction_id' => $transactionID, 'response' => json_encode($responseData)]);
|
|
|
+ throw_logic_exception(msg: '查询订单发货状态失败', status: $responseData['errcode']);
|
|
|
}
|
|
|
return $response->toArray()['order'];
|
|
|
}
|