magento默认方法的成功页面为/checkout/oneage/success
对于paypal网站标准的成功页面是/paypal/standard/success/
有谁能告诉我paypal网站托管专业人士的成功网址是什么?经过一番挖掘后我发现它是paypal/hostedpro/success/
这是对的吗?我需要将成功网址设置为PayPal网站支付托管专业版的返回网址。
请帮忙。
答案 0 :(得分:0)
/**
* 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 中没有 successAction ,只有 returnAction
/**
* 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');
}
}