0

I am trying to implement Google Checkout in my website. I have the PHP code sample named "checkout-php-1.3.2" from http://code.google.com/p/google-checkout-php-sample-code/.

I have followed the instructions and am able to send contents to Google Cart successfully. The problem is i do not know how to update my website's database after the payment has been made. I looked a little in the demo code and there is a page responsehandlerdemo.php and there i can see a lot of notification cases namely

merchant-calculation-callback new-order-notification order-state-change-notification charge-amount-notification

If anybody can provide any help regarding which callback to use and how to parse the xml. It will be very helpful.

Regards, Sourav Mukherjee

1 Answers1

0

With the exception of merchant-calculation-callback (ref), all the other notifications mean something to your order processing (everything that has to do after successful checkout).

E.g.

  • new-order-notification - is what it says it is, data representing a new order
  • order-state-change - orders move into different states (status), so this notification notifies you of them

You should go over the Developer docs particularly the Notification API for details.

I'm not a PHP developer (.Net) but I've seen the sample code and it already includes XML parsing for the notifications you receive. Once you get to know the API, you'll know when/where in the flow you need to add your business code (i.e. database storage, etc.).

EdSF
  • 11,753
  • 6
  • 42
  • 83