You are here

protected function WorldpayRedirect::buildReturnUrl in Commerce Worldpay 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Commerce/PaymentGateway/WorldpayRedirect.php \Drupal\commerce_worldpay\Plugin\Commerce\PaymentGateway\WorldpayRedirect::buildReturnUrl()

Builds the URL to the "return" page.

Parameters

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

Return value

string The "return" page url.

1 call to WorldpayRedirect::buildReturnUrl()
WorldpayRedirect::onNotify in src/Plugin/Commerce/PaymentGateway/WorldpayRedirect.php

File

src/Plugin/Commerce/PaymentGateway/WorldpayRedirect.php, line 481

Class

WorldpayRedirect
Provides the Worldpay Redirect payment gateway.

Namespace

Drupal\commerce_worldpay\Plugin\Commerce\PaymentGateway

Code

protected function buildReturnUrl(OrderInterface $order) {
  return Url::fromRoute('commerce_payment.checkout.return', [
    'commerce_order' => $order
      ->id(),
    'step' => 'payment',
  ], [
    'absolute' => TRUE,
  ])
    ->toString();
}