-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Cashier to send payment confirmations by email
- Loading branch information
1 parent
03f3dcb
commit bccfedf
Showing
7 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@component('mail::message') | ||
# {{ __('Confirm your :amount payment', ['amount' => $payment->amount()]) }} | ||
|
||
{{ __('Extra confirmation is needed to process your payment. Please continue to the payment page by clicking on the button below.') }} | ||
|
||
@component('mail::button', ['url' => route('cashier.payment', ['id' => $payment->id()])]) | ||
{{ __('Confirm Payment') }} | ||
@endcomponent | ||
|
||
{{ __('Thanks') }},<br> | ||
{{ config('app.name') }} | ||
@endcomponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Laravel\Cashier\Mail; | ||
|
||
use Laravel\Cashier\Payment; | ||
use Illuminate\Mail\Mailable; | ||
|
||
class PaymentActionRequired extends Mailable | ||
{ | ||
/** | ||
* The Stripe model instance. | ||
* | ||
* @var \Illuminate\Database\Eloquent\Model | ||
*/ | ||
public $owner; | ||
|
||
/** | ||
* @var \Laravel\Cashier\Payment | ||
*/ | ||
public $payment; | ||
|
||
/** | ||
* Create a new PaymentActionRequired instance. | ||
* | ||
* @param \Illuminate\Database\Eloquent\Model $owner | ||
* @param \Laravel\Cashier\Payment $payment | ||
* @return void | ||
*/ | ||
public function __construct($owner, Payment $payment) | ||
{ | ||
$this->owner = $owner; | ||
$this->payment = $payment; | ||
} | ||
|
||
/** | ||
* Build the message. | ||
* | ||
* @return $this | ||
*/ | ||
public function build() | ||
{ | ||
return $this->subject(__('Confirm Payment')) | ||
->markdown('cashier::emails.payment_action_required'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters