carviaso / google-checkout-dotnet-sample-code

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

Notifcation History Response With No Invalid Order Numbers #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Notification History Request with a valid order number
2. Send the request and get the response
3. Check for invalid order numbers by calling 
GCheckout.OrderProcessing.NotificationHistoryResponse.InvalidOrderNumbers

What is the expected output? What do you see instead?
I expected to get a list of invalid order numbers or an empty collection, 
but instead an ArgumentNullException exception is thrown.

What version of the product are you using? On what operating system?
Revision 220 (head at the moment) from SVN.

Please provide any additional information below.
Suggested patch:
Index: NotificationHistoryResponse.cs
===================================================================
--- NotificationHistoryResponse.cs  (revision 220)
+++ NotificationHistoryResponse.cs  (working copy)
@@ -63,7 +63,10 @@
       get {
         if (_invalidOrderNumbers == null) {
           _invalidOrderNumbers = new List<string>();
-          _invalidOrderNumbers.AddRange(_response.invalidordernumbers);
+          if (_response.invalidordernumbers != null)
+          {
+            _invalidOrderNumbers.AddRange(_response.invalidordernumbers);
+          }
         }
         return _invalidOrderNumbers;
       }

Original issue reported on code.google.com by Trevor.D...@gmail.com on 3 Nov 2009 at 12:37

GoogleCodeExporter commented 9 years ago
The code has been merged

Original comment by joseph.f...@gmail.com on 22 May 2010 at 4:56