I want to download PayPal activity via an api. (i.e. just get a report of a month's payments received).
We are using WooCommerce with PayPal ExpressCheckout. It appears to use the NVP api. (I tried using the REST API and got no results).
I've downloaded the merchant-sdk-dotnet samples (https://github.com/paypal/merchant-sdk-dotnet) but had trouble running them. I've tried to extract the few pieces I need and implement them in a console application (see below). (VS2012 C#)
I'm using the sandbox credentials that were in the aspx samples above (but have also tried our live / real credentials).
The code below always results in a AckCodeType.FAILURE (and no transactions).
...
using PayPal.PayPalAPIInterfaceService;
using PayPal.PayPalAPIInterfaceService.Model;
namespace PayPalToDBMerch
{
class Program
{
static void Main(string[] args)
{
TransactionSearchRequestType request = new TransactionSearchRequestType();
TransactionSearchReq wrapper = new TransactionSearchReq();
wrapper.TransactionSearchRequest = request;
Dictionary<string, string> configurationMap = Configuration.GetAcctAndConfig();
PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);
TransactionSearchResponseType transactionDetails = service.TransactionSearch(wrapper);
if (transactionDetails.Ack == AckCodeType.FAILURE)
{
Console.WriteLine("This is always the result."); //
}
else
{
Console.WriteLine("I never get here.");
}
}
}
Your help is appreciated.