2012-10-02 4 views
0

SetExpressCheckOut에서 토큰 및 payerID를 얻은 후 실제로 사용자로부터 돈을 얻으려고합니다.DoExpressCheckoutPayment가 지불을 처리 한 다음 시간이 초과됩니다.

PayPal 기능 마법사에서 생성 한 코드를 사용하여 ConfirmPayment 함수를 호출합니다.

문제는 함수가 성공적으로 호출되어 사용자의 지불을 처리하지만 시간 초과 오류가 발생한다는 것입니다. 그래서 나는 돈을 받고, 사용자는 타임 아웃 페이지를 얻는다. 고객을 지키는 가장 좋은 방법은 아닙니다.

The operation has timed out 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.WebException: The operation has timed out 

Source Error: 

Line 313: 
Line 314:  //Retrieve the Response returned from the NVP API call to PayPal 
**Line 315:  HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();** 
Line 316:  string result; 
Line 317:  using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) 

paypal 함수의 HTTPCall 함수에서 시작된 315 행에 타임 아웃이 발생합니다.

public string HttpCall (string NvpRequest) // CallNvpServer { string url = pendpointurl;

//To Add the credentials from the profile 
    string strPost = NvpRequest + "&" + buildCredentialsNVPString(); 
    strPost = strPost + "&BUTTONSOURCE=" + HttpUtility.UrlEncode(BNCode); 

    HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url); 
    objRequest.Timeout = Timeout; 
    objRequest.Method = "POST"; 
    objRequest.ContentLength = strPost.Length; 
    //Retrieve the Response returned from the NVP API call to PayPal 
    **HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();** (Line 315) 
    string result; 
    using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) 
    { 
     result = sr.ReadToEnd(); 
    } 

    return result; 
} 

내가 페이팔의 서버 있지만 중 하나 방법이 어쩌면 뭔가 느낌이 작동하지 않으며 살고가는 경우 사용자를 받게됩니다. 갑자기 시간이 왜 늦어지는 지 알기나 해? 동일한 HTTPCall이 전에 SetExpressCheckOut에서 사용되었고 잘 작동합니다.

답변

0

paypalfunctions.cs에는 페이지에 대한 시간 초과를 나타내는 변수가있는 것 같습니다. 그것은 5000으로 설정되었고 페이지로드가 5 초보다 오래 걸리고 시간이 초과 되었기 때문에 나는 그것을 50000으로 단순히 올렸습니다.

관련 문제