public function handleNotification()
    {
        $gateway = $this->oGateway();
        if (!$gateway->supportsAcceptNotification()) {
            throw new InvalidConfigurationException(
                sprintf('The gateway "%s" doesn\'t support "acceptNotification"', $this->payment->Gateway)
            );
        }

        // Deal with the notification, according to the omnipay documentation
        // https://github.com/thephpleague/omnipay#incoming-notifications
        $notification = null;
        try {
            $notification = $gateway->acceptNotification();
        } catch (OmnipayException $e) {
            $this->createMessage(NotificationError::class, $e);
            return $this->generateServiceResponse(
                ServiceResponse::SERVICE_NOTIFICATION | ServiceResponse::SERVICE_ERROR
            );
        }

        if (!($notification instanceof NotificationInterface)) {
            $this->createMessage(
                NotificationError::class,
                'Notification from Omnipay doesn\'t implement NotificationInterface'
            );
            return $this->generateServiceResponse(
                ServiceResponse::SERVICE_NOTIFICATION | ServiceResponse::SERVICE_ERROR
            );
        }

        switch ($notification->getTransactionStatus()) {
            case NotificationInterface::STATUS_COMPLETED:
                $this->createMessage(NotificationSuccessful::class, $notification);
                return $this->generateServiceResponse(ServiceResponse::SERVICE_NOTIFICATION, $notification);
                break;
            case NotificationInterface::STATUS_PENDING:
                $this->createMessage(NotificationPending::class, $notification);
                return $this->generateServiceResponse(
                    ServiceResponse::SERVICE_NOTIFICATION | ServiceResponse::SERVICE_PENDING,
                    $notification
                );
        }

        // The only status left is error
        $this->createMessage(NotificationError::class, $notification);
        return $this->generateServiceResponse(
            ServiceResponse::SERVICE_NOTIFICATION | ServiceResponse::SERVICE_ERROR,
            $notification
        );
    }