mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 23:19:05 +00:00
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class PaymentReceived extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
private $amount;
|
|
private $sn;
|
|
|
|
public function __construct($sn, $amount)
|
|
{
|
|
$this->amount = $amount;
|
|
$this->sn = $sn;
|
|
}
|
|
|
|
public function via($notifiable)
|
|
{
|
|
return sysConfig('payment_received_notification');
|
|
}
|
|
|
|
public function toMail($notifiable)
|
|
{
|
|
return (new MailMessage)
|
|
->subject(__('Payment Received'))
|
|
->line(__('Payment for #:sn has been received! Total amount: ¥:amount.', ['sn' => $this->sn, 'amount' => $this->amount]))
|
|
->action(__('Invoice Detail'), route('invoiceInfo', $this->sn));
|
|
}
|
|
|
|
public function toDataBase($notifiable)
|
|
{
|
|
return [
|
|
'sn' => $this->sn,
|
|
'amount' => $this->amount,
|
|
];
|
|
}
|
|
}
|