lib/custom/src/MShop/Service/Provider/Payment/OmniPay.php
public function updatePush( \Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response )
	{
		try
		{
			$provider = $this->getProvider();
			$params = $request->getQueryParams();

			if( !isset( $params['orderid'] ) ) {
				throw new \Aimeos\MShop\Service\Exception( 'No order ID available' );
			}

			if( !method_exists( $provider, 'supportsAcceptNotification' ) || !$provider->supportsAcceptNotification() ) {
				return; // call updateOrderSync()
			}

			$order = $this->getOrder( $params['orderid'] );
			$omniRequest = $provider->acceptNotification();
			$omniResponse = $omniRequest->send();

			if( method_exists( $omniResponse, 'isSuccessful' ) && $omniResponse->isSuccessful() )
			{
				$order->setPaymentStatus( $this->translateStatus( $omniRequest->getTransactionStatus() ) );
			}
			elseif( method_exists( $omniResponse, 'isPending' ) && $omniResponse->isPending() )
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_PENDING );
			}
			elseif( method_exists( $omniResponse, 'isCancelled' ) && $omniResponse->isCancelled() )
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_CANCELED );
			}
			else
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_REFUSED );
				$this->saveOrder( $order );

				throw new \Aimeos\MShop\Service\Exception( $omniResponse->getMessage() );
			}

			$base = $this->getOrderBase( $order->getBaseId() );
			$this->saveTransationRef( $base, $omniResponse->getTransactionReference() );
			$this->saveRepayData( $omniResponse, $base->getCustomerId() );
			$this->saveOrder( $order );

			$response->withStatus( 200 );
		}
		catch( \Exception $e )
		{
			$response->withStatus( 500, $e->getMessage() );
		}

		return $response;
	}
public function updatePush( \Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response )
	{
		try
		{
			$provider = $this->getProvider();
			$params = $request->getQueryParams();

			if( !isset( $params['orderid'] ) ) {
				throw new \Aimeos\MShop\Service\Exception( 'No order ID available' );
			}

			if( !method_exists( $provider, 'supportsAcceptNotification' ) || !$provider->supportsAcceptNotification() ) {
				return; // call updateOrderSync()
			}

			$order = $this->getOrder( $params['orderid'] );
			$omniRequest = $provider->acceptNotification();
			$omniResponse = $omniRequest->send();

			if( method_exists( $omniResponse, 'isSuccessful' ) && $omniResponse->isSuccessful() )
			{
				$order->setPaymentStatus( $this->translateStatus( $omniRequest->getTransactionStatus() ) );
			}
			elseif( method_exists( $omniResponse, 'isPending' ) && $omniResponse->isPending() )
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_PENDING );
			}
			elseif( method_exists( $omniResponse, 'isCancelled' ) && $omniResponse->isCancelled() )
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_CANCELED );
			}
			else
			{
				$order->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_REFUSED );
				$this->saveOrder( $order );

				throw new \Aimeos\MShop\Service\Exception( $omniResponse->getMessage() );
			}

			$base = $this->getOrderBase( $order->getBaseId() );
			$this->saveTransationRef( $base, $omniResponse->getTransactionReference() );
			$this->saveRepayData( $omniResponse, $base->getCustomerId() );
			$this->saveOrder( $order );

			$response->withStatus( 200 );
		}
		catch( \Exception $e )
		{
			$response->withStatus( 500, $e->getMessage() );
		}

		return $response;
	}
Updates the order status sent by payment gateway notifications

@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\ResponseInterface Response object