首页 文章

magento:“尝试与authorize.net下订单时,”处理您的订单时出错“

提问于
浏览
0

我最近将我的magento系统从1.4.0.1升级到1.7.0.2 .

Error

“处理您的订单时出错”

我没有问题设置付款方式,但是当我尝试使用authorize.net选项时,我收到一条弹出消息,说“处理您的订单时出错” . 该订单未显示在后端,但付款已处理,我收到一封包含我的订单号的确认电子邮件 .

我检查了authorize.net,看看付款是否已经过去,信用卡是否有效,并且它们似乎没有问题,并且由于配置错误而解决了问题 .

编辑:

在日志中发现了这个:

2013-06-22T21:45:48 00:00 ERR(3):异常'PDOException',消息'SQLSTATE [23000]:完整性约束违规:1062 / home /中的密钥'PRIMARY'重复输入'1' bellater / public_html / lib / Zend / Db / Statement / Pdo.php:228堆栈跟踪:#0 /home/bellater/public_html/lib/Zend/Db/Statement/Pdo.php(228):PDOStatement-> execute(Array )#1 /home/bellater/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo - > _ execute(Array)#2 / home / bellater / public_html / lib / Zend / Db / Statement .php(300):Varien_Db_Statement_Pdo_Mysql - > _ execute(Array)#3 /home/bellater/public_html/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)#4 / home / bellater /public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract-> query('INSERT INTO lo ...',Array)\#5 / home / bellater / public_html / lib / Varien / Db / Adapter / Pdo / Mysql.php(419):Zend_Db_Adapter_Pdo_Abstract-> query('INSERT INTOlo ...',Array)#6 /home/bellater/public_html/lib/Zend/Db/Adapter/Abstract.php(57 4):Varien_Db_Adapter_Pdo_Mysql-> query('INSERT INTOlo ...',Array)#7 /home/bellater/public_html/app/code/core/Mage/Log/Model/Resource/Visitor.php(261): Zend_Db_Adapter_Abstract-> insert('log_quote',Array)#8 /home/bellater/public_html/app/code/core/Mage/Log/Model/Resource/Visitor.php(116):Mage_Log_Model_Resource_Visitor - > _ saveQuoteInfo(Object(Mage_Log_Model_Visitor) )#9 /home/bellater/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(463):Mage_Log_Model_Resource_Visitor - > _ afterSave(Object(Mage_Log_Model_Visitor))#10 / home / bellater / public_html / app / code / core / Mage / Core / Model / Abstract.php(318):Mage_Core_Model_Resource_Db_Abstract-> save(对象(Mage_Log_Model_Visitor))#11 / home / bellater / public_html / app / code / core / Mage / Log / Model / Visitor.php(189):Mage_Core_Model_Abstract-> save()#12 /home/bellater/public_html/app/code/core/Mage/Core/Model/App.php(1338):Mage_Log_Model_Visitor-> saveByRequest(Object( Varien_Event_Observer))#13 / home / bellater / public_html / app / code / core / Mage /Core/Model/App.php(1317):Mage_Core_Model_App - > _ callObserverMethod(Object(Mage_Log_Model_Visitor),'saveByRequest',Object(Varien_Event_Observer))#14 /home/bellater/public_html/app/Mage.php(447):Mage_Core_Model_App - > dispatchEvent('controller_acti ...',Array)#15 /home/bellater/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(552):Mage :: dispatchEvent('controller_acti) ...',数组)#16 /home/bellater/public_html/app/code/core/Mage/Core/Controller/Front/Action.php(75):Mage_Core_Controller_Varien_Action-> postDispatch()#17 / home / bellater / public_html / app / code / core / Mage / Core / Controller / Varien / Action.php(423):Mage_Core_Controller_Front_Action-> postDispatch()#18 / home / bellater / public_html / app / code / core / Mage / Core / Controller / Varien / Router / Standard.php(250):Mage_Core_Controller_Varien_Action-> dispatch('add')#19 /home/bellater/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->匹配(对象(Mage_Core_Controller_R equest_Http))#20 /home/bellater/public_html/app/code/core/Mage/Core/Model/App.php(354):Mage_Core_Controller_Varien_Front-> dispatch()#21 / home / bellater / public_html / app / Mage . php(683):Mage_Core_Model_App-> run(数组)#22 /home/bellater/public_html/index.php(87):Mage :: run('','store')#23 {main}下一个异常'Zend_Db_Statement_Exception'消息'SQLSTATE [23000]:完整性约束违规:1062 /home/bellater/public_html/lib/Zend/Db/Statement/Pdo.php:234中键'PRIMARY'的重复条目'1'堆栈跟踪:#0 /home/bellater/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):Zend_Db_Statement_Pdo - > _ execute(Array)#1 /home/bellater/public_html/lib/Zend/Db/Statement.php( 300):Varien_Db_Statement_Pdo_Mysql - > _ execute(Array)#2 /home/bellater/public_html/lib/Zend/Db/Adapter/Abstract.php(479):Zend_Db_Statement-> execute(Array)#3 / home / bellater / public_html / lib / Zend /Db/Adapter/Pdo/Abstract.php(238):Zend_Db_Adapter_Abstract-> query('INSERT INTO lo ...',Array)\#4 / home / bellater / public_html / lib / Varien / Db / Adapter / Pdo / Mysql.php(419):Zend_Db_Adapter_Pdo_Abstract-> query('INSERT INTOlo ...',Array)#5 /home/bellater/public_html/lib/Zend/Db/Adapter/Abstract.php(574):Varien_Db_Adapter_Pdo_Mysql-> query ('INSERT INTOlo ...',数组)#6 /home/bellater/public_html/app/code/core/Mage/Log/Model/Resource/Visitor.php(261):Zend_Db_Adapter_Abstract-> insert('log_quote ',数组)#7 /home/bellater/public_html/app/code/core/Mage/Log/Model/Resource/Visitor.php(116):Mage_Log_Model_Resource_Visitor - > _ saveQuoteInfo(Object(Mage_Log_Model_Visitor))#8 / home / bellater /public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(463):Mage_Log_Model_Resource_Visitor - > _ afterSave(Object(M) age_Log_Model_Visitor))#9 /home/bellater/public_html/app/code/core/Mage/Core/Model/Abstract.php(318):Mage_Core_Model_Resource_Db_Abstract-> save(对象(Mage_Log_Model_Visitor))#10 / home / bellater / public_html / app / code / core / Mage / Log / Model / Visitor.php(189):Mage_Core_Model_Abstract-> save()#11 /home/bellater/public_html/app/code/core/Mage/Core/Model/App.php( 1338):Mage_Log_Model_Visitor-> saveByRequest(Object(Varien_Event_Observer))#12 /home/bellater/public_html/app/code/core/Mage/Core/Model/App.php(1317):Mage_Core_Model_App - > _ callObserverMethod(Object(Mage_Log_Model_Visitor) ,'saveByRequest',Object(Varien_Event_Observer))#13 /home/bellater/public_html/app/Mage.php(447):Mage_Core_Model_App-> dispatchEvent('controller_acti ...',Array)#14 / home / bellater / public_html /app/code/core/Mage/Core/Controller/Varien/Action.php(552):Mage :: dispatchEvent('controller_acti ...',Array)#15 / home / bellater / public_html / app / code / core /Mage/Core/Controller/Front/Action.php(75):Mage_Core_Controller_Varien_ Action-> postDispatch()#16 /home/bellater/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(423):Mage_Core_Controller_Front_Action-> postDispatch()#17 / home / bellater / public_html /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):Mage_Core_Controller_Varien_Action-> dispatch('add')#18 / home / bellater / public_html / app / code / core / Mage / Core / Controller / Varien / Front.php(176):Mage_Core_Controller_Varien_Router_Standard-> match(Object(Mage_Core_Controller_Request_Http))#19 /home/bellater/public_html/app/code/core/Mage/Core/Model/App.php(354) :Mage_Core_Controller_Varien_Front-> dispatch()#20 /home/bellater/public_html/app/Mage.php(683):Mage_Core_Model_App-> run(Array)#21 /home/bellater/public_html/index.php(87):法师: :run('','store')#22

可能是什么问题呢?

1 回答

  • 0

    这意味着在发送支付API请求之后,但在您的Magento系统中创建订单之前,存在Magento或PHP错误 . Magento的代码库中有三个地方,其中的措辞用于例外 .

    app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
    94:            $result['error_msg'] = $this->__('There was an error processing your order. Please contact us or try again later.');
    
    catch (Exception $e) {
        Mage::logException($e);
        $result['success'] = 0;
        $result['error_msg'] = $this->__('There was an error processing your order. Please contact us or try again later.');
    }
    
    app/code/core/Mage/Checkout/controllers/OnepageController.php
    553:            $result['error_messages'] = $this->__('There was an error processing your order. Please contact us or try again later.');
    
    } catch (Exception $e) {
        Mage::logException($e);
        Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage());
        $result['success']  = false;
        $result['error']    = true;
        $result['error_messages'] = $this->__('There was an error processing your order. Please contact us or try again later.');
    }    
    
    app/code/core/Mage/Paypal/Model/Api/Nvp.php
    987:            Mage::throwException(Mage::helper('paypal')->__('There was an error processing your order. Please contact us or try again later.'));
    
    if (!$this->_validateResponse($methodName, $response)) {
        Mage::logException(new Exception(
            Mage::helper('paypal')->__("PayPal response hasn't required fields.")
        ));
        Mage::throwException(Mage::helper('paypal')->__('There was an error processing your order. Please contact us or try again later.'));
    }
    

    正如您所看到的,在每种情况下,Magento都会在重新抛出之前记录异常 . 这意味着将错误记录到 var/log/exception.log (假设您已登录) . 如果为您打开日志记录太多,您可以添加临时调试代码 . 就像是

    var_dump($e->getMessage());
    exit;
    

    在异常块中 . (由于这与PayPal不相关,我猜第三次使用错误信息并不是你所看到的那个) .

    当Magento代码捕获非Magento异常时,它通常使用通用错误消息来隐藏(可能是敏感的)来自最终用户的PHP系统信息 .

相关问题