Fixed missing transaction payment received notification
This commit is contained in:
@@ -22,6 +22,10 @@ class SendDocumentPaymentNotification
|
|||||||
$document = $event->document;
|
$document = $event->document;
|
||||||
$transaction = $document->transactions()->latest()->first();
|
$transaction = $document->transactions()->latest()->first();
|
||||||
|
|
||||||
|
if (! $transaction) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Notify the customer
|
// Notify the customer
|
||||||
if ($document->contact && !empty($document->contact_email)) {
|
if ($document->contact && !empty($document->contact_email)) {
|
||||||
$document->contact->notify(new Notification($document, $transaction, "{$document->type}_payment_customer"), true);
|
$document->contact->notify(new Notification($document, $transaction, "{$document->type}_payment_customer"), true);
|
||||||
|
|||||||
Reference in New Issue
Block a user