2017-02-10 6 views
0

을에 실패 : 괜찮 라이브 모드 모두에서 https://github.com/amirduran/duranius-paypal-rest-api-php-library익스프레스 체크 아웃 DPaypal PHP 라이브 작동하지만이 라이브러리를 사용하고 샌드 박스

을,하지만 난 샌드 박스를 사용하려고하면 그냥 얻을 : INT를 (35)

$requestParameters = array(
      "USER" => $this->username, 
      "PWD" => $this->password, 
      "SIGNATURE" => $this->apiSignature, 
      "METHOD" => $method, 
      "VERSION" => $this->apiVersion, 
     ); 

     $requestParameters+=$requestData; 
     $finalRequest = http_build_query($requestParameters); 

     $ch = curl_init(); 
     $this->curl=$ch; 

     $curlOptions=$this->getcURLOptions(); 
     $curlOptions[CURLOPT_POSTFIELDS]=$finalRequest; 

     curl_setopt_array($ch, $curlOptions); 
     $serverResponse = curl_exec($ch); 

curl_getinfo ($ ch를) 결과 : 난 그냥 https://api-3t.paypal.com/nvp에 URL을 변경하는 경우

array(26) { 
    ["url"]=> 
    string(37) "https://api-3t.sandbox.paypal.com/nvp" 
    ["content_type"]=> 
    NULL 
    ["http_code"]=> 
    int(0) 
    ["header_size"]=> 
    int(0) 
    ["request_size"]=> 
    int(0) 
    ["filetime"]=> 
    int(-1) 
    ["ssl_verify_result"]=> 
    int(1) 
    ["redirect_count"]=> 
    int(0) 
    ["total_time"]=> 
    float(0.228482) 
    ["namelookup_time"]=> 
    float(0.027594) 
    ["connect_time"]=> 
    float(0.175784) 
    ["pretransfer_time"]=> 
    float(0) 
    ["size_upload"]=> 
    float(0) 
    ["size_download"]=> 
    float(0) 
    ["speed_download"]=> 
    float(0) 
    ["speed_upload"]=> 
    float(0) 
    ["download_content_length"]=> 
    float(-1) 
    ["upload_content_length"]=> 
    float(-1) 
    ["starttransfer_time"]=> 
    float(0) 
    ["redirect_time"]=> 
    float(0) 
    ["redirect_url"]=> 
    string(0) "" 
    ["primary_ip"]=> 
    string(11) "173.0.82.83" 
    ["certinfo"]=> 
    array(0) { 
    } 
    ["primary_port"]=> 
    int(443) 
    ["local_ip"]=> 
    string(13) "192.168.1.100" 
    ["local_port"]=> 
    int(53117) 
} 

나는 성공 또는 실패 응답을 얻을 것이다 . 이미 모든 자격 증명을 확인하고 모든 쿠키를 정리하고 실제 및 샌드 박스 계정에 로그인했으며 몇 달 전에 문제없이 사용했습니다.

감사합니다.

답변

0

분명히 문제는 openssl 버전에서 발생했습니다. 내 컴퓨터에 php 7.1의 Mamp (4.1.1)의 마지막 버전을 설치하고 서버의 php 버전을 변경하여 해결했습니다. 지금 일하는 모든 것! ^.^