2016-01-28 69 views
2

PayPal在checkout.php的第一步中失敗,這是從JavaScript調用的。我正在使用沙箱,並嘗試在本地和服務器上運行它。我發了一個技術。支持請求解釋問題,但3天后我沒有聽到任何回覆。我猜想,天氣應該歸咎於天氣。爲什麼PayPal的Express Checkout失敗並沒有錯誤?

以下內容包含所有似乎都能正確輸入的參數字符串。它還包含空白的錯誤消息:

nvpstr = & PAYMENTREQUEST_0_AMT = 15.00 & PAYMENTREQUEST_0_PAYMENTACTION =銷售& RETURNURL = http://jquery.bunkerhill.com/php/orderconfirm.php&CANCELURL=http://jquery.bunkerhill.com/php/cancel.php&PAYMENTREQUEST_0_CURRENCYCODE=USD&REQCONFIRMSHIPPING=0&NOSHIPPING=1&L_PAYMENTREQUEST_0_NAME0=jQuery-Translator&L_PAYMENTREQUEST_0_AMT0=15.00&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_ITEMCATEGORY0=Digital

ACK = SetExpressCheckout API調用失敗。

詳細的錯誤信息:

短錯誤消息:

錯誤代碼:

錯誤的嚴重性代碼:

有沒有人遇到過類似的問題呢?

checkout.php:

<?php 
require_once ("paypalfunctions.php"); 

$PaymentOption = "PayPal"; 
if ($PaymentOption == "PayPal") 
{ 
    // ================================== 
    // PayPal Express Checkout Module 
    // ==================================  

    //'------------------------------------ 
    //' The paymentAmount is the total value of 
    //' the purchase. 
    //' 
    //' TODO: Enter the total Payment Amount within the quotes. 
    //' example : $paymentAmount = "15.00"; 
    //'------------------------------------ 

    $paymentAmount = "15.00"; 

    //'------------------------------------ 
    //' The currencyCodeType 
    //' is set to the selections made on the Integration Assistant 
    //'------------------------------------ 
    $currencyCodeType = "USD"; 
    $paymentType = "Sale"; 

    //'------------------------------------ 
    //' The returnURL is the location where buyers return to when a 
    //' payment has been succesfully authorized. 
    //' 
    //' This is set to the value entered on the Integration Assistant 
    //'------------------------------------ 
    $returnURL = "http://jquery.bunkerhill.com/php/orderconfirm.php"; 

    //'------------------------------------ 
    //' The cancelURL is the location buyers are sent to when they hit the 
    //' cancel button during authorization of payment during the PayPal flow 
    //' 
    //' This is set to the value entered on the Integration Assistant 
    //'------------------------------------ 
    $cancelURL = "http://jquery.bunkerhill.com/php/cancel.php"; 

    //'------------------------------------ 
    //' Calls the SetExpressCheckout API call 
    //' 
    //' The CallSetExpressCheckout function is defined in the file PayPalFunctions.php, 
    //' it is included at the top of this file. 
    //'------------------------------------------------- 

    $items = array(); 
    $items[] = array('name' => 'jQuery-Translator', 'amt' => $paymentAmount, 'qty' => 1); 

    //::ITEMS:: 

    // to add anothe item, uncomment the lines below and comment the line above 
    // $items[] = array('name' => 'Item Name1', 'amt' => $itemAmount1, 'qty' => 1); 
    // $items[] = array('name' => 'Item Name2', 'amt' => $itemAmount2, 'qty' => 1); 
    // $paymentAmount = $itemAmount1 + $itemAmount2; 

    // assign corresponding item amounts to "$itemAmount1" and "$itemAmount2" 
    // NOTE : sum of all the item amounts should be equal to payment amount 

    $resArray = SetExpressCheckoutDG($paymentAmount, $currencyCodeType, $paymentType, 
              $returnURL, $cancelURL, $items); 
    $ack = strtoupper($resArray["ACK"]); 
    if($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") 
    { 
      $token = urldecode($resArray["TOKEN"]); 
      RedirectToPayPalDG($token); 
    } 
    else 
    { 
      //Display a user friendly Error on the page using any of the following error information returned by PayPal 
      $ErrorCode = urldecode($resArray["L_ERRORCODE0"]); 
      $ErrorShortMsg = urldecode($resArray["L_SHORTMESSAGE0"]); 
      $ErrorLongMsg = urldecode($resArray["L_LONGMESSAGE0"]); 
      $ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]); 

      echo "SetExpressCheckout API call failed. " . "<br/>"; 
      echo "Detailed Error Message: " . $ErrorLongMsg . "<br/>"; 
      echo "Short Error Message: " . $ErrorShortMsg . "<br/>"; 
      echo "Error Code: " . $ErrorCode . "<br/>"; 
      echo "Error Severity Code: " . $ErrorSeverityCode . "<br/>"; 
    } 
} 

?> 

回答

1

必須從貝寶,這意味着你可能會得到一個錯誤捲曲,這意味着你可能跑入的SSLv3握手得到一個空白的響應返回PayPal在2016年1月19日剛翻轉交換機時出現故障。

這是貝寶做的,因爲POODLE vulnerability

你應該做的是檢查是否有捲曲的錯誤,以驗證這是你正在運行到(我幾乎可以保證,因爲我們看到很多的它,因爲他們翻轉開關。)

問題

然後,最簡單的事情就是聯繫你的虛擬主機並解釋你遇到了這個問題,他們需要更新你的服務器來修復它。它基本上歸結爲軟件的服務器堆棧,特別是OpenSSL,更新到支持正確處理TLS回退的版本。

+0

以下是我的網站託管服務提供商的迴應:您可能已經瞭解 - 我們無法啓用它,因爲我們無法阻止正在使用受影響域名的相同共享服務器的客戶的安全性,正在使用SSL v3.0。所以我建議你修改你的連接腳本,以便他們可以使用其他連接協議,例如TLS 1.0,TLS 1.1。或者請在這種情況下嘗試與您的開發人員檢查可能的解決方法。請指教。 –

+0

這是來自主機的更新 - 您能否提供服務器上安裝的軟件的確切要求?例如 - 在這種情況下需要必要的OpenSSL版本。或者請提供與您在本案例中獲得的SSL有關的錯誤消息,以便我們將這些用於此事的進一步調查。 –

+0

在你的代碼中強制它是一種變通方法,這不是最好的解決方案。服務器堆棧應該自行回落到兼容協議。我只是告訴人們更新到最新版本並修復它。我還沒有確切指出哪些版本可以解決問題,但有很多關於它的信息。 –

相關問題