i am implementing the First Data Global Gateway API into a Java E-Commerce Web application. The problem that i have is that I get an error message
SGS-020003: Invalid XML
returned from the staging.linkpt.net server. By switching the optional entities off, I managed to locate the problematic entity. It is the Shipping entity. I have the following data inside it:
<shipping>
<zip>开发者_如何学C;10105</zip>
<phone>123456789</phone>
<email>ich@alala.com</email>
<name>DJBla</name> <state>NY</state>
<address1>some city</address1>
<address2>suite 6</address2>
<city>New York</city>
<country>US</country>
</shipping>
According to the First Data Global Gateway User Manual Version 1.1 everything is correct with my XML. Would anyone have an idea where the error could be?
Kind Regards,
B.GeorgI have no idea about First Data Global but I will try to offer some basic XML suggestions. Reading the spec you quote some of the shipping methods require fields that are not in your example - are you sure that you have not used those methods (even by default)?
I would suggest other experiments - take the examples in their manual and see if they work - then at least you know you are not violating the system procedures. Also see if there is an XSD schema and whether your file validates against it. Try inserting the sometimes-required elements and see if that fails to throw errors. Also error messages are often not always as precise as they might be - maybe it is not the contents of the "shipping" that are wrong, but the placement of the shipping itself - maybe it is nt allowed as a child of its parent (without further info I don't think anyone can help).
Not the ideal solution, but the problem seem to be related to the <phone>
tags. Just removing it solve my issue.
<shipping>
<zip>10105</zip>
<email>ich@alala.com</email>
<name>DJBla</name> <state>NY</state>
<address1>some city</address1>
<address2>suite 6</address2>
<city>New York</city>
<country>US</country>
</shipping>
精彩评论