App\Listeners\NotificationListener::createdPayment PHP Метод

createdPayment() публичный Метод

public createdPayment ( PaymentWasCreated $event )
$event App\Events\PaymentWasCreated
    public function createdPayment(PaymentWasCreated $event)
    {
        // only send emails for online payments
        if (!$event->payment->account_gateway_id) {
            return;
        }
        $this->contactMailer->sendPaymentConfirmation($event->payment);
        $this->sendEmails($event->payment->invoice, 'paid', $event->payment);
        $this->pushService->sendNotification($event->payment->invoice, 'paid');
    }