carviaso / google-checkout-dotnet-sample-code

Automatically exported from code.google.com/p/google-checkout-dotnet-sample-code
0 stars 0 forks source link

No way to Send notification-history-request with only serial-number. #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. No Method in current project to send request need as per the v2.5 examples. 

http://code.google.com/apis/checkout/developer/Google_Checkout_Custom_Processing
_How_To.html

and 

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notificat
ion_API.html#serial_number_notifications

What is the expected output? What do you see instead?
way to send notification-history-request with only the serial-number tag.

What version of the product are you using? On what operating system?
Using the 2.5.0.2 download.

Please provide any additional information below.
Would be nice to see an example if this is possible. Also see no way to receive 
the serial_number_notifications, but i think that is just getting the data from 
the request sent in.  

Original issue reported on code.google.com by Mozts2...@gmail.com on 25 Sep 2010 at 12:15

GoogleCodeExporter commented 9 years ago
It looks like either the docs are incorrect on one of the two pages

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notificat
ion_History_API.html#tag_notification-history-request

You will see that serial-number is not a sub tag.

If Google could verify if the request allows that tag, I can change the xsd and 
api to support a serial number only request.

Original comment by joseph.f...@gmail.com on 16 Oct 2010 at 4:22

GoogleCodeExporter commented 9 years ago
Joe, what are the two docs that are in conflict?

Original comment by momander@google.com on 21 Oct 2010 at 3:46

GoogleCodeExporter commented 9 years ago
Look here
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notificat
ion_API.html
Under

Types of Notifications
Serial Number Notifications

Google sends a serial number notification for every order notification. This 
notification is not in XML format and contains the serial number as a name 
value pair in the POST message body.

serial-number=134827144342486-00001-7

The serial number is then used in a Notification History API request to pull 
the associated Google Checkout notification such as the New Order Notification.

<notification-history-request xmlns="http://checkout.google.com/schema/2">
  <serial-number>134827144342486-00001-7</serial-number>
</notification-history-request>'

see the serial number tag?

Now look at the tag reference

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notificat
ion_History_API.html#tag_notification-history-request

serial-number is not a valid child.

One or the other is wrong.

Does that help?

Original comment by joseph.f...@gmail.com on 22 Oct 2010 at 3:46

GoogleCodeExporter commented 9 years ago
I strongly agree with this feature request.

In the meantime, I just published a blog post with a workaround:

1. get the notification with serial number
2. convert the serial number to a google order number
3. call the NotificationHistoryRequest API with the google order number (I want 
to be able to do this with the serial number instead)
4. loop through the NotificationResponses, looking for the one with the 
matching serial number (after detecting and casting the notification from 
object type to it's correct type)

This workaround works, but it performs poorly in comparison to how it should 
work.

My blog post documenting the workaround is here:

http://www.capprime.com/software_development_weblog/2010/11/29/UsingTheGoogleChe
ckout25APIWithASPNETMVCTheMissingSample.aspx

Original comment by Michael....@gmail.com on 29 Nov 2010 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by joseph.f...@gmail.com on 20 Apr 2011 at 8:40

GoogleCodeExporter commented 9 years ago
I ended up just supporting it even though the documents still do not match.

The API Documentation still does not state that serial-number is a sub tag but 
I am pretty sure this is a bug in the docs since the xsd has it.

All you need is the following

      var sn = "123456";
      var request = new NotificationHistoryRequest(new NotificationHistorySerialNumber(sn));

Why the serial number class? We have so many string overloads, there was no way 
to add a new one.

Resolved in checkin 239

Original comment by joseph.f...@gmail.com on 20 Apr 2011 at 8:43

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r239.

Original comment by joseph.f...@gmail.com on 20 Apr 2011 at 8:43

GoogleCodeExporter commented 9 years ago
This issue was closed by revision c1f650a8c007.

Original comment by joseph.f...@gmail.com on 21 Apr 2011 at 5:11