2013-10-22 4 views
0

한 달 전에 우리는 페이팔 표준에서 페이팔 프로로 전달했습니다. 통합 일요일까지 잘 작동 : 가끔 페이팔 반환 나를페이팔 오류 : 503 서비스 일시적으로 사용할 수 없음

Payment_status = Completed 
Errore = 503<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
<html><head> 
<title>503 Service Temporarily Unavailable</title> 
</head><body> 
<h1>Service Temporarily Unavailable</h1> 
<p>The server is temporarily unable to service your 
request due to maintenance downtime or capacity 
problems. Please try again later.</p> 
</body></html> 

어디서 문제를 찾을 수 있습니까?

답변

0

내가 얻었던 503 응답은 "서비스를 사용할 수 없음"이었습니다. 정확히이 서비스와 동일하지 않았습니다. 지불 상태가 '완료되었습니다'

나는 그것에 대해 PayPal에 전화를 걸어서 해결하려고 시도한 끝에 문제가 있다고 말했습니다. 그들은 내가 그 전화를 다시 시도 할 것을 제안했다.

여기가 내가 한 것이며 작동하는 것으로 보입니다.

//$req = set of key/value pairs sent by paypal 
// Step 2: POST IPN data back to PayPal to validate 
$ir = 0; 
while($ir<3&&($ir==0||strpos($res,'Service Unavailable')>0)) { 
    if($ir!=0) { //wait and try again after 1st try 
     //log the problem somehow 
     $sam = 1; 
     sleep(2); 
     unset($res); 
    } 
    //setup the call 
    $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); 
    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 
    curl_setopt($ch, CURLOPT_POST, 1); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, $req); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 
    curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); 
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); 

    if(!($res = curl_exec($ch))) { 
     //log the problem somehow 
     curl_close($ch); 
     exit; 
    } 
    curl_close($ch); 
    $ir += 1; 
} 
관련 문제