Been working on this for a while and just can't get google to accept that I've done what they want so they keep sending me notifications for the same order. The documentation on this is available here:
Google Notification Acknowledgement Documentation
Here is my code on the page which recieves google notifcations:
string serial = Request["serial-number"];
// do my stuff
StringBuilder responseXml = new StringBuilder();
responseXml.Append("<?xml version='1.0' encoding='UTF-8'?>");
responseXml.Append("<notifiation-acknowledgment xmlns=\"http://checkout.google.com/schema/2/\" serial-number=\"");
responseXml.Append(Request["serial-number"]);
responseXml.Append("\" />");
HttpResponse response = HttpContext.Current.Response;
response.StatusCode = 200;
response.ContentType = "text/xml";
response.Write(responseXml.ToString());
You have misspelt "notification-acknowledgment" as "notifiation-acknowledgment".
I would also suggest using GCheckout as briercan said in the comments. If you use that, then all you would have to do is:
var ack = new GCheckout.AutoGen.NotificationAcknowledgment();
ack.serialnumber = serial;
Response.BinaryWrite(GCheckout.Util.EncodeHelper.Serialize(ack));
Response.StatusCode = 200;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With