mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 10:38:14 -05:00
Merge pull request #145 from riolurs/patch-1
feat: Add additional payment information to Telegram notifications.
This commit is contained in:
commit
cd1bd1109c
@ -41,12 +41,22 @@ class PaymentController extends Controller
|
||||
if (!$orderService->paid($callbackNo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$payment = Payment::where('id', $order->payment_id)->first();
|
||||
$telegramService = new TelegramService();
|
||||
$message = sprintf(
|
||||
"💰成功收款%s元\n———————————————\n订单号:%s",
|
||||
"💰成功收款%s元\n" .
|
||||
"———————————————\n" .
|
||||
"支付接口:%s\n" .
|
||||
"支付渠道:%s\n" .
|
||||
"本站订单:`%s`"
|
||||
,
|
||||
$order->total_amount / 100,
|
||||
$payment->payment,
|
||||
$payment->name,
|
||||
$order->trade_no
|
||||
);
|
||||
|
||||
$telegramService->sendMessageWithAdmin($message);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user