How To Skip The
PayPal Express
Review Page in
Magento 1

Author: Rowan Burgess

  • 13 Feb 2021
  • 20 minutes

When using the Paypal Express Checkout with Magento you’ll find, by default, the page flow looks like this:

  • Checkout page
  • Redirect to Paypal website
  • Redirect to Paypal Express Review page on our website
  • Nunc lobortis sem sapien
  • In bibendum turpis accumsan nec
  • Mauris sollicitudin arcu vitae mollis finibus
  • Order success page

The Paypal Express Review page (3.) is essentially unnecessary. We already have all the information we need from the customer, so it’s just adding another opportunity for the customer to bail out of the order.

So, let’s skip it…

Create a copy of the following file in your local code directory (if you need explanation of this, ask me):

app/code/core/Mage/Paypal/Controller/Express/Abstract.php

Search in function ‘returnAction()’ for the following line of code:

$this->_redirect('*/*/review');

Change it to:

$this->_redirect('*/*/placeholder');

This essentially just says, “when we return from Paypal website, redirect to the ‘placeOrder()’ function instead.”

Next, create a copy of the following file in your local code directory:

app/code/core/Mage/Paypal/Controller/Express/Abstract.php

Find function ‘getExpressCheckoutStartUrl()’, and add a URL parameter to the list. So, from:

public function getExpressCheckoutStartUrl($token)
{
return $this->getPaypalUrl(array(
'cmd' => '_express-checkout',
'token' => $token
));
}

To

public function getExpressCheckoutStartUrl($token)
{
return $this->getPaypalUrl(array(
'cmd' => '_express-checkout',
'token' => $token
));
}

This adds a parameter to the Paypal URL that the customer visits. It tells Paypal to consider this a final step in payment, instead of verification only. This will just change the Paypal complete button from “Complete” (I think), to “Pay”

Done. This should save your business an abandoned cart, or two..

Note: There are reasons why this could fail. In those circumstances, the customer will be redirected automatically to the review page. For example, if you don’t have something set up that checks the customer has chosen a delivery option before they proceed to Paypal, it’ll throw an error (you can debug this from ‘placeOrderAction()’) and send the customer to the Paypal Express review page, instead of completing the order.

Let’s talk about how
I can help you