Fixed missing transaction payment received notification

This commit is contained in:
Cüneyt Şentürk 2023-06-16 10:45:57 +03:00
parent ca0843c4b6
commit a411107a5f

View File

@ -22,6 +22,10 @@ class SendDocumentPaymentNotification
$document = $event->document;
$transaction = $document->transactions()->latest()->first();
if (! $transaction) {
return;
}
// Notify the customer
if ($document->contact && !empty($document->contact_email)) {
$document->contact->notify(new Notification($document, $transaction, "{$document->type}_payment_customer"), true);