I am trying to extend default PayPal Express functionality.
I have successfully rewritten app/code/core/Mage/Paypal/Model/Config.php
like
<global>
<models>
<paypalexpressconfirmation>
<class>Namespace_PayPalExpressConfirmation_Model</class>
</paypalexpressconfirmation>
<paypal>
<rewrite>
<config>Namespace_PayPalExpressConfirmation_Model_Config</config>
</rewrite>
</paypal>
</models>
</global>
But cannot find the way to overwrite
public function returnAction()
{
try {
$this->_initCheckout();
$this->_checkout->returnFromPaypal($this->_initToken());
$this->_redirect('*/*/placeOrder');
return;
}
catch (Mage_Core_Exception $e) {
Mage::getSingleton('checkout/session')->addError($e->getMessage());
}
catch (Exception $e) {
Mage::getSingleton('checkout/session')->addError($this->__('Unable to process Express Checkout approval.'));
Mage::logException($e);
}
$this->_redirect('checkout/cart');
}
in app/code/core/Mage/Paypal/Controller/Express/Abstract.php
I have tried using an observer in the event controller_action_predispatch_paypal_express_return and its triggered when customer come back from PayPal page but I don't see anything that allows me to intercept this method and rewrite it.
Thanks