0

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.

hookedonwinter
  • 12,436
  • 19
  • 61
  • 74

2 Answers2

1

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
  • 7,509
  • 2
  • 26
  • 43
0

Generally, you can use the merchant-private-data field to pass any custom data about your order.

When you get back the notification, read the custom info from the merchant-private-data field.

See this answer for a solution to a similar issue.

Community
  • 1
  • 1
Mihai Ionescu
  • 2,108
  • 1
  • 12
  • 15