1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
invoiceninja/app/Jobs/SendPaymentEmail.php

49 lines
919 B
PHP
Raw Normal View History

2017-01-11 13:06:15 +01:00
<?php
namespace App\Jobs;
use App\Models\Payment;
use App\Ninja\Mailers\ContactMailer;
use Illuminate\Contracts\Queue\ShouldQueue;
2017-01-30 20:40:43 +01:00
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
2017-01-11 13:06:15 +01:00
/**
2017-01-30 20:40:43 +01:00
* Class SendInvoiceEmail.
2017-01-11 13:06:15 +01:00
*/
class SendPaymentEmail extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
/**
* @var Payment
*/
protected $payment;
2017-05-04 19:08:27 +02:00
/**
* @var string
*/
protected $server;
2017-01-11 13:06:15 +01:00
/**
* Create a new job instance.
2017-01-11 14:40:13 +01:00
* @param Payment $payment
2017-01-11 13:06:15 +01:00
*/
public function __construct($payment)
{
$this->payment = $payment;
2017-05-04 19:08:27 +02:00
$this->server = config('database.default');
2017-01-11 13:06:15 +01:00
}
/**
* Execute the job.
*
* @param ContactMailer $mailer
*/
2017-01-11 14:40:13 +01:00
public function handle(ContactMailer $contactMailer)
2017-01-11 13:06:15 +01:00
{
2017-01-11 14:40:13 +01:00
$contactMailer->sendPaymentConfirmation($this->payment);
2017-01-11 13:06:15 +01:00
}
}