2

I am trying to figure out how to parse the private-merchant-data variable sent back by google checkout. I've tried the following but I get an error when google posts back to my page:

privatedata = ThisItem.merchantprivateitemdata.Any[0].Value.ToString();

I only have one child node returned by google and that is

<MERCHANT_DATA_HIDDEN>ae36ca4d-af36-4f69-8075-34441ff5130b</MERCHANT_DATA_HIDDEN>

Weston Goodwin
  • 343
  • 5
  • 17

1 Answers1

1

Here's my code that parses the Merchant Private Data:

GCheckout.AutoGen.anyMultiple oneAnyMultiple =
  inputNewOrderNotification.shoppingcart.merchantprivatedata;
System.Xml.XmlNode[] oneXmlNodeArray = oneAnyMultiple.Any;
string hiddenMerchantPrivateData = oneXmlNodeArray[0].InnerText;

I'm starting from the ShoppingCart item on the NewOrderNotification object. It appears that you may be starting elsewhere so adjust accordingly as needed.

Michael Maddox
  • 12,331
  • 5
  • 38
  • 40