Search code examples
e-commercegoogle-apigoogle-checkout

Google Checkout API - Connect order with notification?


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.


Solution

  • 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
            {
    
            }