Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 支付过程后getOrderPlaceRedirectUrl未重定向_Php_Magento_Redirect_Payment Gateway - Fatal编程技术网

Php 支付过程后getOrderPlaceRedirectUrl未重定向

Php 支付过程后getOrderPlaceRedirectUrl未重定向,php,magento,redirect,payment-gateway,Php,Magento,Redirect,Payment Gateway,我正在Magento中实现一种支付方法,在支付过程结束时,我加入了getOrderPlaceRedirectUrl方法 public function authorize(Varien_Object $payment, $amount) { if ($amount <= 0) { Mage::throwException(Mage::helper('paygate')->__('Invalid amount for authorization.'));

我正在Magento中实现一种支付方法,在支付过程结束时,我加入了getOrderPlaceRedirectUrl方法

public function authorize(Varien_Object $payment, $amount) {
    if ($amount <= 0) {
        Mage::throwException(Mage::helper('paygate')->__('Invalid amount for authorization.'));
    }
    $this->_auth_credentials[0] = Mage::getStoreConfig($this->_formDataInfo . 'username');
    $this->_auth_credentials[1] = Mage::getStoreConfig($this->_formDataInfo . 'vpnpwd');
    //The following _place method builds a request and returns the response from the payment gateway
    $this->_place($payment, $amount, $this->_auth_credentials);

    return $this;
}

public function getOrderPlaceRedirectUrl() {
    Mage::Log('Returning Redirect URL:: ' . Mage::getSingleton('customer/session')->getLocalRedirect());
    return Mage::getSingleton('customer/session')->getLocalRedirect();
}
公共功能授权(变量对象$payment,$amount){
如果($amount u uuu('Invalid amount for authorization'));
}
$this->_auth_credentials[0]=Mage::getStoreConfig($this->_formDataInfo.'username');
$this->_auth_credentials[1]=Mage::getStoreConfig($this->_formDataInfo.'vpnpwd');
//下面的_place方法构建一个请求并从支付网关返回响应
$this->\u place($payment,$amount,$this->\u auth\u凭证);
退还$this;
}
公共函数getOrderPlaceRedirectUrl(){
Mage::Log('Returning Redirect URL::'。Mage::getSingleton('customer/session')->getLocalRedirect());
返回Mage::getSingleton('customer/session')->getLocalRedirect();
}
URL是在从支付服务提供商成功返回数据后通过会话设置的。我没有在任何地方调用这个方法,它是按照正常的支付程序自动调用的

日志显示正确的URL
返回重定向URL::/payment/index/Redirect
,但过程在此结束,无需进一步重定向

我试着将URL硬编码作为一个测试,但它似乎不起作用


我没有收到任何错误或异常,只是没有重定向。

我找到了解决方案

在这个过程中,我链接到许多不同的自定义类;处理响应报告,并构建要发送到支付网关的初始支付对象

在其中一些方法中,我发现我正在打印/记录一些变量。删除这些修复了我的问题

以这种方式打印/记录可能会中断重定向过程

通常这会告诉我“头已经被发送了”,但是根本没有错误报告,所以很难调试