You are here

public function OffsitePaymentGatewayBase::onReturn in Commerce Core 8.2

Processes the "return" request.

This method should only be concerned with creating/completing payments, the parent order does not need to be touched. The order state is updated automatically when the order is paid in full, or manually by the merchant (via the admin UI).

Parameters

\Drupal\commerce_order\Entity\OrderInterface $order: The order.

\Symfony\Component\HttpFoundation\Request $request: The request.

Throws

\Drupal\commerce_payment\Exception\PaymentGatewayException Thrown when the request is invalid or the payment failed.

Overrides OffsitePaymentGatewayInterface::onReturn

1 method overrides OffsitePaymentGatewayBase::onReturn()
OffsiteRedirect::onReturn in modules/payment_example/src/Plugin/Commerce/PaymentGateway/OffsiteRedirect.php
Processes the "return" request.

File

modules/payment/src/Plugin/Commerce/PaymentGateway/OffsitePaymentGatewayBase.php, line 26

Class

OffsitePaymentGatewayBase
Provides the base class for off-site payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

public function onReturn(OrderInterface $order, Request $request) {
}