google-code-export / google-checkout-java-sdk

Automatically exported from code.google.com/p/google-checkout-java-sdk
1 stars 0 forks source link

Invalid serial number Error #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using API, Got the Checkout-Redirect Message from Google Checkout
<checkout-redirect serial-number="a3abeb35-5856-4970-a373-c78e17c8f56c" 
xmlns="http://checkout.google.com/schema/2">
    <redirect-url>https://sandbox.google.com/checkout/view/buy?o=shoppingcart&amp;shoppingcart=876314957173224</redirect
-url>
</checkout-redirect>

2. Trying to get the notification details using the same serial number
Notification notification = 
API_CONTEXT.reportsRequester().requestNotification(("a3abeb35-5856-4970-a373-c78
e17c8f56c"));
3. Getting the following error message:
Response:       14:14:30,707 ERROR [[jsp]] Servlet.service() for servlet jsp 
threw exception
com.google.checkout.sdk.util.HttpUrlException: Response Code:   400
With Url:       [ 
https://sandbox.google.com/checkout/api/checkout/v2/reports/Merchant/41769879051
6168 ]
Request:        [ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<notification-history-request xmlns="http://checkout.google.com/schema/2">
    <serial-number>a3abeb35-5856-4970-a373-c78e17c8f56c</serial-number>
</notification-history-request>
 ]
Response:       [ <?xml version="1.0" encoding="UTF-8"?>
<error xmlns="http://checkout.google.com/schema/2" 
serial-number="05da888c-42e1-408c-b25e-c864b855e877">
  <error-message>Invalid serial number: a3abeb35-5856-4970-a373-c78e17c8f56c</error-message>
</error>

What is the expected output? What do you see instead?
Expecting the Notification details.

What version of the product are you using? On what operating system?
Both 2.5.0 and 2.5.1 versions are producing the Same Problem

Original issue reported on code.google.com by raviv...@gmail.com on 16 May 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Hello,

Note that their are two DIFFERENT serial numbers in play here - its not defined 
anywhere, but I found it out hard way.

1. When you submit cart, Google checkout responds with one serial number and 
URL to redirect user to to complete the checkout process

2. Serial Number you get in order notifications (along with Google order number 
and other data)

These two serial numbers are NOT same.

The report requester you are using is expecting to provide serial number you 
received in notification (#2) and not the one you received as part of post cart 
call (#1).

If you observe, the serial number in the response to postCart looks more like 
UUID (the one you are trying above), whereas the serial number received in 
notification is of different format - like 847322935296354-00001-7

This is reason you are getting error (since you are passing incorrect serial 
number).

On the other hand, I guess what you are trying to do is try to link the cart 
you posted with the order in Google checkout - for that there is no easy method 
available (for unknown reasons) - best you can do is pass merchant private data 
along with cart. Then make notification history call based on time and scan for 
your merchant private data to find real Google Checkout order number.

Original comment by cont...@deepakshah.com on 28 Jul 2011 at 7:56