protected function PaymentProcess::getErrorStepId in Commerce Core 8.2
Gets the step ID that the customer should be sent to on error.
Return value
string The error step ID.
1 call to PaymentProcess::getErrorStepId()
- PaymentProcess::buildPaneForm in modules/
payment/ src/ Plugin/ Commerce/ CheckoutPane/ PaymentProcess.php - Builds the pane form.
File
- modules/
payment/ src/ Plugin/ Commerce/ CheckoutPane/ PaymentProcess.php, line 283
Class
- PaymentProcess
- Provides the payment process pane.
Namespace
Drupal\commerce_payment\Plugin\Commerce\CheckoutPaneCode
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 PaymentProcess 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;
}