File: /var/www/vhost/disk-apps/comfama.sports-crowd.com/app/Mail/Payment/ConfirmPaymentMail.php
<?php
namespace App\Mail\Payment;
use App\Core\Payment\Entities\Payment;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class ConfirmPaymentMail extends Mailable
{
use Queueable, SerializesModels;
public $userName;
public $gatewayTxCode;
public $title;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Payment $payment)
{
$this->title = 'Compra en lĂnea';
$this->userName = $payment->customer()->name();
$this->gatewayTxCode = $payment->paymentGatewayTxId();
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject($this->title)->view('mails.payment.confirmPayment');
}
}