2022-09-20 19:59:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Notifications\Subscription;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
|
|
|
|
class FailedPaymentNotification extends Notification implements ShouldQueue
|
|
|
|
{
|
|
|
|
use Queueable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the notification's delivery channels.
|
|
|
|
*
|
|
|
|
* @param mixed $notifiable
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function via($notifiable)
|
|
|
|
{
|
|
|
|
return ['mail'];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the mail representation of the notification.
|
|
|
|
*
|
|
|
|
* @param mixed $notifiable
|
|
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
|
|
*/
|
|
|
|
public function toMail($notifiable)
|
|
|
|
{
|
2024-02-23 10:54:12 +00:00
|
|
|
return (new MailMessage())
|
2022-09-20 19:59:52 +00:00
|
|
|
->subject('Your Payment Failed')
|
|
|
|
->greeting(__('We tried to charge your card for your OpenForm subscription but the payment but did not work.'))
|
|
|
|
->line(__('Please go to OpenForm, click on your name on the top right corner, and click on "Billing".
|
|
|
|
You will then be able to update your card details. To avoid any service disruption, you can reply to this email whenever
|
|
|
|
you updated your card details, and we\'ll manually attempt to charge your card.'))
|
2024-01-11 13:07:27 +00:00
|
|
|
->action(__('Go to OpenForm'), front_url('/'));
|
2022-09-20 19:59:52 +00:00
|
|
|
}
|
|
|
|
}
|