1

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>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.Georg

B.Georg
  • 11
  • 2

2 Answers2

0

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>
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
0

I 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).

peter.murray.rust
  • 37,407
  • 44
  • 153
  • 217
  • hello, thank you for your answer. i tried with values of the other fields that are required, although i don't really need them for my application because i don't use the shipping and tax calculator. it didn't work either. the whole shipping entity is an optional one and without it, my application works fine. – B.Georg Dec 30 '10 at 20:54
  • about the XSD schema, i dont have one but i will try to obtain one from first data. – B.Georg Dec 30 '10 at 20:58
  • The Schema validation will probably be a necessary but not sufficient condition as the words in the spec would not all be possible to put into a schema constraint. I'd agree with @John that order of child elements *might* matter though the spec doesn't seem to require it – peter.murray.rust Dec 30 '10 at 21:23