feat: add day-3 branded payment-failure reminder mailable
This commit is contained in:
33
app/Mail/PaymentFailedDay3Reminder.php
Normal file
33
app/Mail/PaymentFailedDay3Reminder.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\PlanFeatures;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
|
||||
final class PaymentFailedDay3Reminder extends Mailable
|
||||
{
|
||||
public function __construct(public readonly User $user) {}
|
||||
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
subject: 'Heads up — your FuelAlert payment is retrying',
|
||||
);
|
||||
}
|
||||
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(
|
||||
markdown: 'emails.payment-failed-day-3',
|
||||
with: [
|
||||
'name' => $this->user->name,
|
||||
'tier' => PlanFeatures::for($this->user)->tier(),
|
||||
'portalUrl' => route('billing.portal'),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user