views:

36

answers:

1

Using the Google Checkout XML API, is it possible to connect an order you send to Google Checkout to an order Google Checkout notifies you about?

Right now, I can send an order to Google Checkout, and I can get notifications from Google that an order went through. But I don't see how to connect the two. I need this to connect orders to user accounts.

+1  A: 

Send over an explicit order number with your data to Google. This is some test code I wrote that does just this

        CheckoutShoppingCartRequest Req = checkoutButton.CreateRequest();
        Req.AddItem(product.Name, product.ShortDescription, OrderID, product.Price, 1);
        GCheckoutResponse Resp = Req.Send();

        if (Resp.IsGood)
        {

        }
        else
        {

        }
TheGeekYouNeed
I'm doing this in PHP and using the xml server-server checkout. I want to do what you've suggested, but I don't quite understand how with my implementation.
hookedonwinter
Have you looked over this? http://code.google.com/apis/checkout/samples/Google_Checkout_Sample_Code_PHP.html
TheGeekYouNeed
Ya a few times. I figured it out, using your idea as a base. Thanks for that.
hookedonwinter