carviaso / google-checkout-dotnet-sample-code

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

Default Tax Rate Not Being Put Into XML #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use v2.5 of the API
2. Call AddPostalAreaTaxRule with a country code of GB, VAT rate and specify 
deliver shipping taxed or not.
3. Get an error of "This feature is unavailable outside of the United States of 
America.". Checking the XML the default rate is not specified even though it is 
set in the code.

What is the expected output? What do you see instead?
A successful call to Google.

What version of the product are you using? On what operating system?
v2.5. Windows 7.

Please provide any additional information below.
I believe this issue is not just through AddPostalAreaTaxRule, but this is the 
one I had to change for my own application to work. No where is 
'rule.rateSpecified' set to true. Once set to true then the call works 
perfectly to Google, as can be seen by the rate actually being in the XML once 
set to true. I added this line on row 296 of AlternateTaxTable.cs.

This has been talked about at:
http://www.google.com/support/forum/p/checkout-merchants/thread?tid=48737748b98f
3206&hl=en
They use reflection to set this value to true.

Original issue reported on code.google.com by mar...@h2ecommerce.com on 13 Apr 2011 at 11:22

GoogleCodeExporter commented 9 years ago

Original comment by joseph.f...@gmail.com on 20 Apr 2011 at 6:08

GoogleCodeExporter commented 9 years ago
Issue resolved in 238
Another potential issue was also fixed regarding taxing shipping

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

GoogleCodeExporter commented 9 years ago
Hi, I have checked out the latest but I still receive the "This feature is 
unavailable outside of the United States of America" error. The issue being the 
XML not being built with the VAT rate for the default tax rule. I have attached 
an example showing what I mean.

Apologies, I did put the wrong line number/file above though - adding 
'Rule.rateSpecified = true;' after line 1657 in CheckoutShoppingCartRequest.cs 
fixes the issue for myself. 

I can see the change done, to fix this problem, to 'AddNewTaxRule', which now 
sets rateSpecified to true but this is done before the new rule is added so 
that NewRule is not set to "rateSpecified".

Original comment by mar...@h2ecommerce.com on 21 Apr 2011 at 3:58

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry I missed that one. I will post a fix. There were 3 areas that had the 
specified issue. I really hate that feature of xsd's in .net.

Original comment by joseph.f...@gmail.com on 21 Apr 2011 at 4:03

GoogleCodeExporter commented 9 years ago
Issue is now resolved in checkin f8cf0e300db7

Original comment by joseph.f...@gmail.com on 21 Apr 2011 at 7:01

GoogleCodeExporter commented 9 years ago
Hi, Many thanks for the update Joeseph. 

FYI: I have pulled down the latest but I received a different error around tax 
tables:

"Error parsing XML; message from parser is: cvc-complex-type.2.4.b: The content 
of element 'alternate-tax-table' is not complete. One of 
'{"http://checkout.google.com/schema/2":alternate-tax-rules}' is expected."

The generated XML is missing the '<alternate-tax-rules />' tag within the 
'alternate-tax-table' parent that the old code added.

I've put in an extra line in the calling code to force this tag to be added of:
altTaxTable.AddPostalAreaTaxRule("GB", 0)
This is for a "tax exempt" tax table.

Original comment by mar...@h2ecommerce.com on 26 Apr 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Do you have any alternate tax tables?

alternate-tax-rules is not a required tag according to the documentation.

It there any way you can email me the document that you are attempting to post 
to GC or at least the tax-tables section?

Thanks

Original comment by joseph.f...@gmail.com on 26 Apr 2011 at 12:44

GoogleCodeExporter commented 9 years ago
Hi,
Attached is the request and the response (slightly edited to remove anything 
possibly internal).

Original comment by mar...@h2ecommerce.com on 26 Apr 2011 at 3:16

Attachments:

GoogleCodeExporter commented 9 years ago
Xml makes me crazy.

I will be checking in a change in a few minutes for that change.

Original comment by joseph.f...@gmail.com on 26 Apr 2011 at 3:46

GoogleCodeExporter commented 9 years ago
Sorry, the repo was down for maintenance

Please download GCheckoutV2.5.0.5-Test.zip.

I added code before the last release to only set the node if an item exists but 
GC wants to see an empty node.

Original comment by joseph.f...@gmail.com on 26 Apr 2011 at 5:25

Attachments:

GoogleCodeExporter commented 9 years ago
No problem, odd that they require that node.
That works a dream, thank you.

Original comment by mar...@h2ecommerce.com on 27 Apr 2011 at 12:00

GoogleCodeExporter commented 9 years ago
Glad to hear it works. Sorry about breaking the feature for you.

Feel free to email or log any other issues you run into.

Original comment by joseph.f...@gmail.com on 27 Apr 2011 at 2:32

GoogleCodeExporter commented 9 years ago
Change is pushed to v2.5.0.6

Original comment by joseph.f...@gmail.com on 28 Apr 2011 at 12:48