2015-05-01 32 views
1

我已經使用了PayPal API,其中首先我做了preapproval,然後使用該批准密鑰進行了鏈接支付。一切工作正常我的本地服務器上。但是,在活着的時候,它給了我下面的錯誤。貝寶預先覈准給出錯誤

預先批准

錯誤

PreapprovalResponse Object 
(
[responseEnvelope] => ResponseEnvelope Object 
    (
     [timestamp] => 2015-05-01T08:38:40.374-07:00 
     [ack] => Failure 
     [correlationId] => 88fffca2a737c 
     [build] => 15743565 
    ) 

[preapprovalKey] => 
[error] => Array 
    (
     [0] => ErrorData Object 
      (
       [errorId] => 580001 
       [domain] => PLATFORM 
       [subdomain] => Application 
       [severity] => Error 
       [category] => Application 
       [message] => Invalid request: Data validation warning(line -1, col 0): null 
       [exceptionId] => 
       [parameter] => Array 
        (
         [0] => ErrorParameter Object 
          (
           [name] => 
           [value] => Data validation warning(line -1, col 0): null 
          ) 

         [1] => ErrorParameter Object 
          (
           [name] => 
           [value] => Data validation warning(line -1, col 0): null 
          ) 

        ) 

      ) 

    ) 

) 

我的要求是

requestEnvelope.errorLanguage = EN_US & cancelUrl = HTTP%3A%2F%2Fredesignbox.com%2Fopendemo%2Fhappyfund% 2Fcheckout & currencyCode = RUB & maxAmountPerPayment = 1%2C032.00 &個maxNumberOfPayments = 1個& maxTotalAmountOfAllPayments = 1%2C032.00 & RETURNURL = HTTP%3A%2F%2Fredesignbox.com%2Fopendemo%2Fhappyfund%2Fcheckout_action%2Faction%2FafterApproval & STARTINGDATE = 2015年5月1日& feesPayer = PRIMARYRECEIVER

響應是

responseEnvelope.timestamp = 2015-05-01T08%3A38%3A40.374-07%3A00 & responseEnvelope.ack =失敗& responseEnvelope.correlationId = 88fffca2a737c & responseEnvelope.build = 157 43565 &錯誤(0)= .errorId 580001 &錯誤(0)。域= PLATFORM &錯誤(0)= .subdomain應用&錯誤(0).severity =錯誤&錯誤(0)= .category應用&錯誤(0 ).message =無效+請求%3A +數據+驗證+警告%28line + -1%2C + col + 0%29%3A + null &錯誤(0).parameter(0)=數據+驗證+警告%28line + - 1%2C + col + 0%29%3A + null & error(0).parameter(1)= Data + validation + warning%28line + -1%2C + col + 0%29%3A + null

什麼是錯我無法理解。

編輯

在當地我的SSL版本是 的OpenSSL/0.9.8y和 對生活的NSS/3.16.2.3基本ECC

回答

0

取出「 ,「在」maxAmountPerPayment「和」maxTotalAmountOfAllPayments「字段中,然後重試。它應該正常工作

1
$maxpaymentss = floor(2000/68.50); 

$data = array(

    'ClientDetails' => array(
     'applicationId' => 'My_APP', 
    ), 
    'returnUrl' => 'http://www.yourdomain.com/success.html', 
    'cancelUrl' => 'http://www.yourdomain.com/cancel.html', 
    'startingDate' => gmdate("Y-m-d\TH:i:s\Z"), 
    'endingDate' => gmdate("Y-m-d\TH:i:s\Z"), 
    'maxAmountPerPayment' => 68.50, 
    'maxNumberOfPayments' => $maxpaymentss, 
    'maxTotalAmountOfAllPayments' => 2000.00, 
    'maxNumberOfPaymentsPerPeriod' => 1, 
    'currencyCode' => 'USD', 
    'requestEnvelope' => array(
     'errorLanguage' => 'en_US', 
     'detailLevel' => 'ReturnAll' 
    ) 
); 

這些是PayPal自適應預先批准的實時模式的必填字段。