Commit b05482c5 authored by Wayne Eaker's avatar Wayne Eaker
Browse files

Issue #3193795 by zengenuity: Update module to work with the latest version of Commerce

parent f563aaf7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -89,7 +89,14 @@ class MultiplePaymentProcess extends PaymentProcess {
      }
    }
    catch (NeedsRedirectException $e){
      // This is fine.
      // We could be redirecting from success or failure.
      // Need to check if we're redirecting to the error step
      $error_step_id = $this->getErrorStepId();

      if($e->getTrace()[0]['args'][0] == $error_step_id) {
        $this->reverseStagedPayments($staged_payments);
        $this->redirectToPreviousStep(TRUE);
      }
    }
    catch (\Error $e) {
      // If crash from main pane form processing, reverse payments and go back.