Actually all the solutions mentioned here required to edit the Magento core. This is known as bad practise and does not keep your shop updateable.
What you need to do for a clean solution:
- Create a module (in my exampe: Avoe_Paypal) to include the changes
- Rewrite Paypal Config
- Redirect on paypal express review step which is http://yourdomain.com/paypal/express/review/
1) Create your module
Avoe/Paypal/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Avoe_Paypal>
<version>0.1.0</version>
</Avoe_Paypal>
</modules>
<global>
<models>
<Avoe_Paypal>
<class>Avoe_Paypal_Model</class>
</Avoe_Paypal>
<paypal>
<rewrite>
<config>Avoe_Paypal_Model_Config</config>
</rewrite>
</paypal>
</models>
<events>
<controller_action_predispatch_paypal_express_review>
<observers>
<avoe_paypal_predispatch>
<type>singleton</type>
<class>Avoe_Paypal_Model_Observer</class>
<method>paypalExpressReturnPredispatch</method>
</avoe_paypal_predispatch>
</observers>
</controller_action_predispatch_paypal_express_review>
</events>
</global>
</config>
app/etc/Avoe_Paypal.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Avoe_Paypal>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Paypal />
</depends>
</Avoe_Paypal>
</modules>
</config>
2) Rewrite config, add useraction 'commit':
<?php
class Avoe_Paypal_Model_Config extends Mage_Paypal_Model_Config {
/**
* Get url for dispatching customer to express checkout start
* Added useraction 'commit' to remove PayPal Express Checkout review page
*
* @param string $token
* @return string
*/
public function getExpressCheckoutStartUrl($token)
{
return $this->getPaypalUrl(array(
'cmd' => '_express-checkout',
'useraction' => 'commit',
'token' => $token,
));
}
}
3) Create observer to redirect:
<?php
class Avoe_Paypal_Model_Observer {
function paypalExpressReturnPredispatch($observer) {
Mage::app()->getResponse()->setRedirect(Mage::getUrl('*/*/placeOrder'));
}
}
There is also a small Magento extension which was just released yesterday, to remove the review step:
https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep