For the past two weeks I have been grappling with creating a PayPal integration for Gameolith. PayPal’s documentation (located at x.com) is frequently outdated, inaccurate, incomplete and even contradicts itself many a time. Their sandbox is buggy and broken, and went down shortly before I was about to launch, forcing me to delay its launch for more than a week.
This post documents my many trials and tribulations of dealing with their API, sandbox and documentation, in no particular order.
The documentation is disorganised and confusing
To make sense of the PayPal Express Checkout API, I downloaded 4 separate PDF files. I also referred to 3 pages off this API reference to do with Express Checkout operations.
When it came to implementing IPN (Instant Payment Notification, basically a webhook) I had a hard time finding any information on the different payment statuses of an order on the PayPal X website. After looking it up on Google, I found it in a completely different part of the website.
I can’t set an NOTIFYURL (for IPN) in a SetExpressCheckout call
This makes IPN essentially useless in Express Checkout. Instead, I have to define a RETURNURL and set up a separate page (accessed by the user) to process the transaction and redirect the user as appropriate. I would rather do this in an IPN call.
GetExpressCheckoutDetails returns an undocumented value, CHECKOUTSTATUS
The GetExpressCheckoutDetails call returns a CHECKOUTSTATUS value rather than a PAYMENTSTATUS value, which is what I had come to expect after reading the NVP API reference. This post on the X.com forum reveals that CHECKOUTSTATUS is not a documented value, provides some information on it, and mentions that they’d “submitted a Doc update for this to be included in the guide”.
What is CALLBACK for?
The NVP API reference defines CALLBACK as follows:
(Optional) URLto which the callback request from PayPal is sent. It must startwith HTTPS for production integration. It can start with HTTPS orHTTP for sandbox testing.
Character length and limitations:1024 characters
But what on earth is the callback for? I assumed it sent back payment details to a URL of my choosing. But when I actually came to try and use it, I got an error which implied it was actually for postage calculations.
PayPal’s laughable lack of customer service
The day I was due to launch, which was July 14th 2011, I changed the PayPal credentials to the ones we would be using in production.
They didn’t work.
It failed because PayPal Express Checkout for Digital Goods hadn’t been activated on the account yet. Except I had rang them several days earlier to do just that, and they assured me it had been done. It hadn’t.
Cue a day full of phone calls, ringing PayPal to try and resolve it. I rang Customer Service (who I had contacted the other day), and they directed me to another number, which turned out to be telesales. Telesales directed me to Merchant Technical Support. Merchant Technical Support sent me right back to Telesales again. I filled out a form on the PayPal website, ostensibly about signing up for Digital Goods, and got an e-mail back welcoming me to PayPal, as if I didn’t have an account already. I replied to the e-mail asking them to activate my account, and got another phone call with a lady telling me I needed help with my integration, which I didn’t, BECAUSE IT WAS OTHERWISE WORKING PERFECTLY.
So the woman told me I would receive a phone call the next morning from the Integration team. I put out messages on Twitter, Facebook, and e-mailed all my partners to let them know I had to delay the launch yet again. And I must say that the response was outstanding.