I'm trying to configure Magento so that if it's a recurring payment through Paypal it goes to a different checkout success page than if it was a normal order, I have found the below in the file /app/code/core/Mage/Paypal/Controller/Express/Abstract.php
Could I do a statement to say if recurring payment then redirect to xxxx.html else redirect checkout/onepage/success?
// recurring profiles may be created along with the order or without it
$profiles = $this->_checkout->getRecurringPaymentProfiles();
if ($profiles) {
$ids = array();
foreach($profiles as $profile) {
$ids[] = $profile->getId();
}
$session->setLastRecurringProfileIds($ids);
}
// redirect if PayPal specified some URL (for example, to Giropay bank)
$url = $this->_checkout->getRedirectUrl();
if ($url) {
$this->getResponse()->setRedirect($url);
return;
}
$this->_initToken(false); // no need in token anymore
$this->_redirect('checkout/onepage/success/');
return;