对于默认方法在magento中的成功页面是/checkout/oneage/success
贝宝网站的成功页面标准为/paypal/standard/success/
有人能告诉我贝宝网站托管专业版的成功url是什么吗 这是正确的吗?我需要成功的网址设置为返回网址在网站支付托管专业在贝宝方面。 请帮忙。
在Mage/Paypal/controllers/StandardController中有一种方法,如successAction,它最终将您重定向到签出/成功/单页
/**
* when paypal returns
* The order information at this point is in POST
* variables. However, you don't want to "process" the order until you
* get validation from the IPN.
*/
public function successAction()
{
$session = Mage::getSingleton('checkout/session');
$session->setQuoteId($session->getPaypalStandardQuoteId(true));
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
}
在HostedproController中,没有成功操作,只有返回操作
/**
* When a customer return to website from gateway.
*/
public function returnAction()
{
$session = $this->_getCheckout();
//TODO: some actions with order
if ($session->getLastRealOrderId()) {
$this->_redirect('checkout/onepage/success');
}
}