diff --git a/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php b/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php index b9d3bc0098..9fee06a599 100644 --- a/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php +++ b/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php @@ -118,6 +118,8 @@ public function buildPaneForm(array $pane_form, FormStateInterface $form_state, catch (DeclineException $e) { $message = $this->t('We encountered an error processing your payment method. Please verify your details and try again.'); drupal_set_message($message, 'error'); + $this->order->get('payment_gateway')->setValue(NULL); + $this->order->get('payment_method')->setValue(NULL); $this->redirectToPreviousStep(); } catch (PaymentGatewayException $e) {