paypal网站支付专业版托管后成功的magento网址

时间:2015-04-07 07:13:50

标签: php magento paypal

magento默认方法的成功页面为/checkout/oneage/success

对于paypal网站标准的成功页面是/paypal/standard/success/

有谁能告诉我paypal网站托管专业人士的成功网址是什么?经过一番挖掘后我发现它是paypal/hostedpro/success/

这是对的吗?我需要将成功网址设置为PayPal网站支付托管专业版的返回网址。

请帮忙。

1 个答案:

答案 0 :(得分:0)

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 中没有 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');
    }
}