You are here

public function RobokassaPayment::onReturn in Commerce robokassa 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 OffsitePaymentGatewayBase::onReturn

File

src/Plugin/Commerce/PaymentGateway/RobokassaPayment.php, line 254

Class

RobokassaPayment
Provides the Off-site Robokassa payment gateway.

Namespace

Drupal\commerce_robokassa\Plugin\Commerce\PaymentGateway

Code

public function onReturn(OrderInterface $order, Request $request) {
  drupal_set_message($this
    ->t('Payment was processed'));
}