2013-04-18 2 views
0

여기에 표시된 것처럼 나는 TransactionSearch을 실행하기 위해 페이팔의 Webservice를 호출로 고민하고 있습니다 :페이팔 Webservice를 존중하지 않는 STARTDATE/종료 날짜

AccountType accountType = AccountType.Live; 
tblPayPalAccount account = PayPalAPICallHelperSOAP.GetAccount(accountType); 
DateTime endDate = new DateTime(2012, 1, 1); 
DateTime startDate = new DateTime(2012, 12, 31); 


using (PayPalAPIInterfaceClient client = new PayPalAPIInterfaceClient()) 
{ 
    client.Endpoint.Address = new System.ServiceModel.EndpointAddress("https://api-3t.paypal.com/2.0"); 
    UserIdPasswordType userIdPasswordType = PayPalAPICallHelperSOAP.GetUserIdPasswordType(account); 
    CustomSecurityHeaderType header = new CustomSecurityHeaderType(); 
    header.Credentials = userIdPasswordType; 

    TransactionSearchReq request = new TransactionSearchReq(); 

    request.TransactionSearchRequest = new TransactionSearchRequestType(); 

    request.TransactionSearchRequest.Version = account.version; 
    request.TransactionSearchRequest.StartDate = startDate; 

    request.TransactionSearchRequest.EndDate = endDate; 

    TransactionSearchResponseType transactionSearchResponseType = client.TransactionSearch(ref header, request); 
} 

난 항상 67 개 결과 오늘부터 얻을 수에 관계없이 어떤 값 I StartDate/EndDate에 전달 (이 경우 2012이지만 지난 몇 주 동안 만 값을받습니다.)

내가 누락 된 것이 있습니까? 이것은 실제로 꽤 오래 동안 저를 괴롭 히고 있습니다. 그리고 무엇을 설정했는지에 상관없이 결과는 항상 같습니다.

+0

'startDate'와 (과)'endDate'를 바꿔서 사용할 수 있습니까? – Silvermind

+0

1 시간 전에 같은 생각을 했었지만 바꿔 치기하면 아무런 변화가 없으며 항상 같은 결과를 반환합니다. –

+0

웃긴 점은 지정된 연도 (2012)에 대해서는 2013을 반환하고 이후에는 뒤로 이동하는 것입니다 ... 2012 년 온라인으로 두 번 확인했는데 2012 년에 100 개가 넘는 결과가 있습니다. SDK를 사용하면 작동합니다. 괜 찮 아 요, 그것은 웹 서비스를 사용할 때만 실패합니다 ... –

답변

1
request.TransactionSearchRequest.EndDateSpecified = true; 

웹 서비스에 종료 날짜가 설정되었음을 알리십시오. 이렇게하면 문제가 해결됩니다. 왜 그것이 필요한지 알 수 없습니다.

관련 문제