This commit is contained in:
chenbo 2023-11-21 11:07:13 +08:00
parent 2c9a697a5f
commit 8cfe98adc6
1 changed files with 4 additions and 4 deletions

View File

@ -199,11 +199,11 @@ class WeChatPayMerchantService extends BasePayService
$server = $this->app->getServer(); $server = $this->app->getServer();
// 支付通知 // 支付通知
$server->handlePaid(function (Message $message) { $server->handlePaid(function (Message $message) {
Log::info(['支付回调信息', $message]); \think\facade\Log::info(['支付回调信息', $message]);
if ($message['trade_state'] === 'SUCCESS') { if ($message['trade_state'] === 'SUCCESS') {
$this->handlePaid($message); $this->handlePaid($message);
} else { } else {
Log::info('支付失败', $message); \think\facade\Log::info('支付失败', $message);
} }
return true; return true;
}); });
@ -232,7 +232,7 @@ class WeChatPayMerchantService extends BasePayService
// 回调业务系统 // 回调业务系统
PaymentLogic::callBusiness($order['business_callback_url'], ['out_trade_no'=>$order['business_order_no'], 'transaction_id'=>$transaction_id, 'pay_status'=>1]); PaymentLogic::callBusiness($order['business_callback_url'], ['out_trade_no'=>$order['business_order_no'], 'transaction_id'=>$transaction_id, 'pay_status'=>1]);
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error(['支付回调信息处理失败', $e->getMessage(),$message]); \think\facade\Log::error(['支付回调信息处理失败', $e->getMessage(),$message]);
return; return;
} }
@ -243,7 +243,7 @@ class WeChatPayMerchantService extends BasePayService
$server = $this->app->getServer(); $server = $this->app->getServer();
// 退款通知 // 退款通知
$server->handleRefunded(function (Message $message) { $server->handleRefunded(function (Message $message) {
Log::info(['退款回调信息', $message]); \think\facade\Log::info(['退款回调信息', $message]);
return true; return true;
}); });
return $server->serve(); return $server->serve();