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

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

MerchantCalculationResult bug #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found a bug within the Java client library. The thread can be found here:

http://groups.google.com/group/google-checkout-api-java/browse_thread/thread/15c
554b63fb59858/f9e6b1b3c18e22ef#f9e6b1b3c18e22ef

As I stated in the thread, this seems like the addResult method in the
MerchantCalculationResult was adding total-tax to the first result
container it found rather than looking for any specific attributes.
Changing the line:

Element result = Utils.findElementOrContainer(document, results,
"result");

to
Element result =
Utils.findContainerWithAttributeValueElseCreate(document, results,
"result", "shipping-name", shippingName);

fixes this bug. Perhaps you would like to include this change in the next
release.

Original issue reported on code.google.com by si...@simonjsmith.com on 26 Aug 2008 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by mihai.io...@gmail.com on 28 Mar 2011 at 11:20