Home MVC Storefront

PayPal API Invalid Version Number Error

Recently, the good folks at PayPal updated their API routines and added not only a new "version", but a whole new service call. I don't know why they needed a whole new service, but suffice it to say that it's there, and you have to know which service to use when calling the API. You can see all of this in the API Wrapper if you would like to know more.

Along with these changes was the need to let PayPal know which "Version" of their API you wanted to use. I don't know why they followed this convention, but the engineers their are pretty clever for the most part (except with their error messages :) so I am sure there is a reason. Anyway, if you submit your old API requests without setting a version number, you get an "Invalid Version" error which really makes no sense to the calling routine. You need to specify this value in your request call like this:

GetTransactionDetailsRequestType detailRequest = new GetTransactionDetailsRequestType();
detailRequest.TransactionID = transactionID;
detailRequest.Version = "1.0";

This tells PayPal that you want to use Version "1.0" of their API and their happy. I don't really know what happens if you specify "2.0" or "Dippity Donut" for that matter (i haven't tried the latter though I am tempted).


Search Me
Subscribe

Index Of MVC Screencasts

You can watch all of the MVC Screencasts up at ASP.NET, and even leave comments if you like.

Popular Posts
 
My Tweets
  • @jasonbock Kittens are having a really, really rough go of it then - Oxite is #2 on Codeplex downloads: http://www.codeplex.com/
  • Ergodynamic urinals. Awesome. http://twitpic.com/102dz
  • @paulsterling went to Laurelwood yesterday - absolutely stellar
  • At Hopwerks in Portland; awesome beer, outstanding grub, and a play area for the girls. Portland rocks.
  • I seem to have found @shanselman's otter... With "carrot"and all
  About Me



Hi! My name is Rob Conery and I work at Microsoft. I am the Creator of SubSonic and was the Chief Architect of the Commerce Starter Kit (a free, Open Source eCommerce platform for .NET)

I live in Kauai, HI with my family, and when my clients aren't looking, I sometimes write things on my blog (giving away secrets of incalculable value).