You are here

protected function Braintree3DSReview::getErrorStepId in Commerce Braintree 8

Gets the step ID that the customer should be sent to on error.

Return value

string The error step ID.

2 calls to Braintree3DSReview::getErrorStepId()
Braintree3DSReview::buildPaneForm in src/Plugin/Commerce/CheckoutPane/Braintree3DSReview.php
Builds the pane form.
Braintree3DSReview::validatePaneForm in src/Plugin/Commerce/CheckoutPane/Braintree3DSReview.php
Validates the pane form.

File

src/Plugin/Commerce/CheckoutPane/Braintree3DSReview.php, line 199

Class

Braintree3DSReview
Adds 3DS authentication for Braintree vaulted/stored payment methods.

Namespace

Drupal\commerce_braintree\Plugin\Commerce\CheckoutPane

Code

protected function getErrorStepId() {

  // Default to the step that contains the PaymentInformation pane.
  $step_id = $this->checkoutFlow
    ->getPane('payment_information')
    ->getStepId();
  if ($step_id == '_disabled') {

    // Can't redirect to the _disabled step. This could mean that isVisible()
    // was overridden to allow Braintree3DSReview to be used without a
    // payment_information pane, but this method was not modified.
    throw new \RuntimeException('Cannot get the step ID for the payment_information pane. The pane is disabled.');
  }
  return $step_id;
}