payment Card first 4 payments inc. mails
This commit is contained in:
parent
c20deac3fe
commit
6e3adac4d7
38 changed files with 3063 additions and 921 deletions
69
app/Mail/MailCheckout.php
Normal file
69
app/Mail/MailCheckout.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\Services\Util;
|
||||
|
||||
class MailCheckout extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $txaction;
|
||||
public $shopping_order;
|
||||
public $shopping_payment;
|
||||
|
||||
public $subject;
|
||||
public $data;
|
||||
|
||||
|
||||
public function __construct($txaction, $shopping_order, $shopping_payment)
|
||||
{
|
||||
$this->txaction = $txaction;
|
||||
$this->shopping_order = $shopping_order;
|
||||
$this->shopping_payment = $shopping_payment;
|
||||
|
||||
$this->subject = __('Deine Bestellung auf mivita.care');
|
||||
if($shopping_order->user_shop){
|
||||
$this->subject = __('Deine Bestellung auf '.$shopping_order->user_shop->slug.'.mivita.care');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('Dear customer').",";
|
||||
|
||||
if($this->shopping_order->shopping_user){
|
||||
$salutation = __('Hallo')." ".$this->shopping_order->shopping_user->billing_firstname." ".$this->shopping_order->shopping_user->billing_lastname.",";
|
||||
//make Adresse
|
||||
|
||||
}
|
||||
if($this->txaction == 'paid'){
|
||||
return $this->view('emails.checkout')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => __('vielen Dank für Deine Bestellung bei mivita.care.<br><br>Nachfolgend haben wir zur Kontrolle Deine Bestellung noch einmal aufgelistet.'),
|
||||
'shopping_order' => $this->shopping_order,
|
||||
'shopping_payment' => $this->shopping_payment,
|
||||
'copy3line' => __('Bei Fragen sind wir jederzeit für Dich da.'),
|
||||
'greetings' => __('Best regards'),
|
||||
'sender' => __('your mivita.care team'),
|
||||
]);
|
||||
}else{
|
||||
return $this->view('emails.checkout_status')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => "Status zu Deiner Bestellung bei mivita.care",
|
||||
'txactionn' => $this->txaction,
|
||||
'shopping_order' => $this->shopping_order,
|
||||
'shopping_payment' => $this->shopping_payment,
|
||||
'copy3line' => __('Bei Fragen sind wir jederzeit für Dich da.'),
|
||||
'greetings' => __('Best regards'),
|
||||
'sender' => __('your mivita.care team'),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue