feat: Complete checkout overhaul with Stripe PaymentIntent integration and abandoned cart recovery
This commit is contained in:
44
app/Mail/PurchaseConfirmation.php
Normal file
44
app/Mail/PurchaseConfirmation.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\PackagePurchase;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class PurchaseConfirmation extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public function __construct(public PackagePurchase $purchase)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
subject: __('emails.purchase.subject', ['package' => $this->purchase->package->name]),
|
||||
);
|
||||
}
|
||||
|
||||
public function content(): Content
|
||||
{
|
||||
return new Content(
|
||||
view: 'emails.purchase',
|
||||
with: [
|
||||
'purchase' => $this->purchase,
|
||||
'user' => $this->purchase->tenant->user,
|
||||
'package' => $this->purchase->package,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
public function attachments(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user