|
|
@@ -6,6 +6,7 @@ namespace SixShop\WechatPay\Hook;
|
|
|
use SixShop\Payment\Event\PaymentSuccessEvent;
|
|
|
use SixShop\WechatPay\Config;
|
|
|
use SixShop\WechatPay\Trait\MiniAppTrait;
|
|
|
+use think\facade\Log;
|
|
|
|
|
|
class SpecialOrderHook
|
|
|
{
|
|
|
@@ -22,7 +23,11 @@ class SpecialOrderHook
|
|
|
public function debugMode(PaymentSuccessEvent $event): void
|
|
|
{
|
|
|
if ($this->config->isDebug()) {
|
|
|
- $this->opSpecialOrder($event->orderNo, 2);
|
|
|
+ try {
|
|
|
+ $this->opSpecialOrder($event->orderNo, 2);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ Log::error('特殊订单报备失败', ['order_no' => $event->orderNo, 'msg' => $e->getMessage()]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|