详细支付信息

This commit is contained in:
riolu.rs 2024-06-08 17:51:38 +08:00 committed by GitHub
parent 59f40dfd02
commit cd45e55620
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,12 +41,22 @@ class PaymentController extends Controller
if (!$orderService->paid($callbackNo)) { if (!$orderService->paid($callbackNo)) {
return false; return false;
} }
$payment = Payment::where('id', $order->payment_id)->first();
$telegramService = new TelegramService(); $telegramService = new TelegramService();
$message = sprintf( $message = sprintf(
"💰成功收款%s元\n———————————————\n订单号:%s", "💰成功收款%s元\n" .
"———————————————\n" .
"支付接口:%s\n" .
"支付渠道:%s\n" .
"本站订单:`%s`"
,
$order->total_amount / 100, $order->total_amount / 100,
$payment->payment,
$payment->name,
$order->trade_no $order->trade_no
); );
$telegramService->sendMessageWithAdmin($message); $telegramService->sendMessageWithAdmin($message);
return true; return true;
} }