Two weeks ago, I wrote about wasting my time trying to integrate Google Checkout into our top secret web app. You may be glad to hear that my time is no longer being wasted and I seem to have finally solved my Google Checkout conundrum as of this week.
Why did it take so long?
Firstly, ‘No‘, it didn’t take me 2 weeks to get it to work – how little you guys must think of my programming skills! but then again, it was hardly done in an instant.
After working hard trying to understand how Google Checkout worked, the penny finally dropped this week. The fact that it took so long for me to ‘get’ Google Checkout’s API is not to allude that Google Checkout API is awful – far from it. In fact, now that I understand it, I can safely say that it’s pretty good. (Disclaimer: I haven’t worked with that many APIs so my judgement is cloudy)
My major problem, with the Google Checkout PHP API, was the documentation not being quite good enough. Yes, it’s okay, and it does the job satifactorily but judging by the amount of questions getting asked in the official forum, it isn’t doing its job as well as it could be. The main reason for this, is an assumption of too much knowledge on Google’s part.
Why did it finally click?
After my initial post about Google Checkout, where I got very disheartened when their server sandbox server went haywire leaving me wasting a day. Rather than putting my fist through my imac in a fit of frustration, I took some time away and set to working on some other projects before returning to Google Checkout a week later.
I also went through the (troublesome) file that dealt with Google Checkout’s XML responses and tried to log every action it was taking in my database. In this file, I had to intersperse my own code with Google’s in order to make sure my database recorded transactions. Trouble was, adding my own code often caused Google’s code to break which, was not their fault, admittedly, but working out why it was breaking was quite difficult (as the code would fail silently) and half the time I didn’t know if the Google Sandbox server was down or whether my code was at fault – it was mostly the latter.
Then, I found this tool which enabled me to see if the Google Checkout Sandbox was working properly and also if my response script had any errors in it.� – Yes, I know I need a proper debugger and shouldn’t be relying on tools like this :)
I also discovered Google Checkout has a section in the admin area that shows the errors they experienced trying to contact your server. This allowed me to see when it was my code that was failing and not Google’s which meant debugging was easier.
Why are you telling us this?
The point is not that, how I got Google Checkout to integrate but, that more is posisble than you imagine. Two weeks ago, the thought of having to integrate another API was daunting whereas now, it isn’t as much.
A major factor in getting this to work was taking a break from it for a week – often you can spend so much time thinking about something that the wood becomes invisible due to all the trees. As soon as you take a break and do something else, often the questions that were troubling you have simple answers.