2013-03-20 54 views
0

我無法使用Paypal Payments Pro在Magento 1.6.1上調試支付網關。它始終與消息'處理您的訂單時出錯。請聯繫我們或稍後再試「Magento付款失敗,在函數callDoDirectPayment()

我已經嘗試過檢查錯誤日誌,並且發佈了下面的結果:第一次使用這個系統和更多的前端開發,但我正在設法跟隨與

地方出現失敗的關鍵線路的PHP。是

$this->_importFromResponse($this->_doDirectPaymentResponse, $response); 

有人能準確解釋這一行呢?是什麼在調查這個過程中一個明智的下一步應該是什麼?任何額外的貝寶/ Magento的具體的知識比歡迎!

我猜測,自數組創建後,它可能是一個問題轉移到貝寶(我的api簽名應該沒問題 - 快速門戶的作品) - 我將如何去確認或譴責這個假設?

由於

(前8行的VAR/exception.log-與引用的代碼段,並且還從由法師::日誌()函數產生的VAR/SYSTEM.LOG一些額外的內容。 )

exception 'Mage_Core_Exception' with message 'There was an error processing your order. 
Please contact us or try again later.' in /var/www/magento/app/Mage.php:563 

堆棧跟蹤:

#0 /var/www/magento/app/code/core/Mage/Paypal/Model/Api/Nvp.php(974): 
    Mage::throwException('There was an er...') 

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.')); 
    } 

#1 /var/www/magento/app/code/core/Mage/Paypal/Model/Api/Nvp.php(648): 

Mage_Paypal_Model_Api_Nvp->call('DoDirectPayment', Array) 
public function callDoDirectPayment() 
{ 
     Mage::log("hello world"); 

// 2013-03-20T00:04:50 + 00:00 DEBUG(7):世界你好

$request = $this->_exportToRequest($this->_doDirectPaymentRequest); 

     Mage::log($request); 

// 2013-03-20T00:04:50 + 00:00 DEBUG(7):陣列

$this->_exportLineItems($request); 
    if ($this->getAddress()) { 
     $request = $this->_importAddresses($request); 
    } 
    $response = $this->call(self::DO_DIRECT_PAYMENT, $request); 

     Mage::log($response); 

[PAYMENTACTION] =>授權

[IPADDRESS ] => 81.98.95.116

[RETURNFMFDETAILS] => 1

[AMT] => 0。50

[CURRENCYCODE] => GBP

[INVNUM] => 100000063

[NOTIFYURL] =>http://www.store.com/paypal/ipn/

[EMAIL] =>你好@電子郵件

[CREDITCAR] => xxxxxxxxxxxxxx

[EXPDATE] => xxxxxx

[CVV2] => XXX

[ISSUENUMBER] =>

$this->_importFromResponse($this->_doDirectPaymentResponse, $response); 

Mage::log("nothing to see here") 

//這沒有返回到SYSTEM.LOG,所以我假定是故障點

} 




#2 /var/www/magento/app/code/core/Mage/Paypal/Model/Direct.php(343): 
Mage_Paypal_Model_Api_Nvp->callDoDirectPayment() 


// call api and import transaction and other payment information 
/** 
* Place an order with authorization or capture action 
* 
* @param Mage_Sales_Model_Order_Payment $payment 
* @param float $amount 
* @return Mage_Paypal_Model_Direct 
*/ 
protected function _placeOrder(Mage_Sales_Model_Order_Payment $payment, $amount) 
{ //...........(343) 

    $api->callDoDirectPayment(); 
    $this->_importResultToPayment($api, $payment); 

    try { 
     $api->callGetTransactionDetails(); 
    } catch (Mage_Core_Exception $e) { 
     // if we recieve errors, but DoDirectPayment response is Success, then set  
       Pending status for transaction 
     $payment->setIsTransactionPending(true); 
    } 

(343)

$this->_importResultToPayment($api, $payment); 
    return $this; 
} 


#3 /var/www/magento/app/code/core/Mage/Paypal/Model/Direct.php(178):  
Mage_Paypal_Model_Direct->_placeOrder(Object(Mage_Sales_Model_Order_Payment), 45) 
#4 /var/www/magento/app/code/core/Mage/Sales/Model/Order/Payment.php(1026): 
Mage_Paypal_Model_Direct->authorize(Object(Mage_Sales_Model_Order_Payment), 45) 
#5 /var/www/magento/app/code/core/Mage/Sales/Model/Order/Payment.php(311): 
Mage_Sales_Model_Order_Payment->_authorize(true, 45) 
#6 /var/www/magento/app/code/core/Mage/Sales/Model/Order.php(855): 
Mage_Sales_Model_Order_Payment->place() 
#7 /var/www/magento/app/code/core/Mage/Sales/Model/Order.php(1073): 
Mage_Sales_Model_Order->_placePayment() 
#8 [internal function]: Mage_Sales_Model_Order->place() 

回答

1

您是否在Magento的PayPal設置中啓用了調試功能?如果是這樣,那麼您應該在/ var/log中看到日誌顯示,以便您可以看到來回發送的RAW請求和響應數據。

這將允許您查看回復中返回的實際錯誤代碼和消息,這將幫助您找出究竟發生了什麼問題。

+0

從我的問題可能不清楚,但上面發佈的代碼是var/exception.log的前8行(帶有引用的代碼片段),以及由法師生成的var/system.log中的一些額外內容:: log()函數。感謝您的建議,我會修改我的問題,使其更清楚。 – happilyUnStuck 2013-03-20 10:06:40

+0

我剛剛明白你的意思。不太清楚我錯過了paypal_payment_direct.log!我覺得很累。任何想法接下來要做什麼? ( [TIMESTAMP] => 2013-03-20T10:47:01Z [的correlationID] => ec92b4c870cd2 [ACK] =>失敗 [VERSION] => 72.0 [BUILD] => 5479129 [L_ERRORCODE0] => 10002 [L_SHORTMESSAGE0] =>身份驗證/授權失敗 [L_LONGMESSAGE0] =>您無權進行此API調用 [L_SEVERITYCODE0] =>錯誤 ) – happilyUnStuck 2013-03-20 11:36:51