I am trying to execute the TransactionSearchReq method using the PayPal SOAP API and i get the following warning:
ShortMessage: Search warning
LongMessage: The number of results were truncated. Please change your search parameters if you wish to see all your results.
ErrorCode: 11002
SeverityCode: Warning
It also says in the docs that "The maximum number of transactions that can be returned from a TransactionSearch API call is 100." (https://developer.paypal.com/docs/classic/api/merchant/TransactionSearch_API_Operation_SOAP/)
Is there some way to paginate results so that I can get more than 100 results from multiple queries?
Here's one way you can do it in Rails. This assumes you want to search from a specific point in time until now, but you could change the
end_date
to specify an end date. Note that I've added the'paypal-sdk-merchant'
gem to my gemfile (see https://github.com/paypal/merchant-sdk-ruby) and followed the instructions to setup my authentication.The two things you'll want to edit below are the
start_date
method (to set your own start date) and thedo_something(x)
method which will be whatever you want to do to each of the individual orders within your date range.