How to process a google-checkout "buy-now button" transaction?

252 Views Asked by At

Google-checkout has a wizard that creates the html code for the button, but how do I have my website get confirmation that the transaction has been completed (or that it wasn't)?

EDIT: I have already seen pages such as https://developers.google.com/checkout/developer/Google_Checkout_HTML_API_Notification_API#Receiving_and_Processing_Notifications and the like. But I don't know how to implement them. For example: what is "HTTP Basic Authentication" , "HTTP request headers" , "HTTP 200 response code" , "POST" , etc.

So what I need is a simple (!) example with minimum code.

1

There are 1 best solutions below

1
On

You would have to implement Google's Notification API. You can read about it here: Implementing the Notification HTML API.

Edit

In Response to:

Thanks. But unfortunately I don't know enough web developing to know how to apply what is written there.

I'll be honest with you. Simple is relative and if you aren't familiar with some of the fundamental concepts as POST and request headers, it's likely you will never get a simple response.

Having said that, I believe the simplest solution for you is to manually confirm the transaction upon receipt of the confirmation email.

I envision that you would have some sort of management screen that displays a list of all 'pending' transactions. When you receive your confirmation email from Google, you would simply mark the corresponding transaction as having been completed. This is not entirely uncommon. In fact, since you are using single-item purchases using the Google button, this is probably the best option for you.

A more complex scenario (again not a simple solution), would be to create a service that will parse your emails and using some voodoo to map those emails to the corresponding transaction in your web app. This, though, is probably as advanced as implementing the Notification API.