<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error E00003 while testing json post in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55032#M29977</link>
    <description>&lt;P&gt;This is weird. I got past the above error by rearrainging how I built the json in the tool I'm using.&lt;/P&gt;&lt;PRE&gt;{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "7YJ9A2pkC98", 
      "transactionKey": "28S7jjRAvAYa953d"
    }, 
    "refId": "123456", 
    "transactionRequest": {
      "amount": 5, 
      "billTo": {
        "address": "15 Main Street", 
        "city": "Pecan Springs", 
        "company": "none", 
        "firstName": "Ellen", 
        "lastName": "Johnson", 
        "state": "TX", 
        "zip": "44628"
      }, 
      "payment": {
        "creditCard": {
          "cardCode": "999", 
          "cardNumber": "5424000000000015", 
          "expirationDate": "1220"
        }
      }, 
      "transactionSettings": {
        "setting": {
          "settingName": "testRequest", 
          "settingValue": "false"
        }
      }, 
      "transactionType": "authCaptureTransaction"
    }
  }
}&lt;/PRE&gt;&lt;P&gt;Same resulting json, but now it got past that error and then found a real error (I hadn't built the payment object correctly).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation implies (with a dot) that refID should be an element of the merchantAuthentication object, but the sample code, which works, doesn't build it that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it's complaining that the billTo isn't expected as part of the transactionRequest. It want's userFields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
	"messages": {
		"resultCode": "Error",
		"message": [
			{
				"code": "E00003",
				"text": "The element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'billTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'userFields' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."
			}
		]
	}
}&lt;/PRE&gt;&lt;P&gt;What I'm learning is that (like a lot of code) what the error says may not be what the error means.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a successful transaction if I take out the billTo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 03:02:09 GMT</pubDate>
    <dc:creator>leehinde</dc:creator>
    <dc:date>2016-06-28T03:02:09Z</dc:date>
    <item>
      <title>Error E00003 while testing json post</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55031#M29976</link>
      <description>&lt;P&gt;I'm testing using the same data in the docs, but was trying to figure out the minimum data needed. But I'm not getting that far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I post&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "7YJ9A2pkC98", 
      "transactionKey": "28S7jjRAvAYa953d"
    }, 
    "refId": "123456", 
    "transactionRequest": {
      "amount": 5, 
      "billTo": {
        "address": "15 Main Street", 
        "city": "Pecan Springs", 
        "company": "none", 
        "firstName": "Ellen", 
        "lastName": "Johnson", 
        "state": "TX", 
        "zip": "44628"
      }, 
      "payment": {
        "cardCode": "999", 
        "cardNumber": "5424000000000015", 
        "expirationDate": "1220"
      }, 
      "transactionSettings": {
        "setting": {
          "settingName": "testRequest", 
          "settingValue": "false"
        }
      }, 
      "transactionType": "authCaptureTransaction"
    }
  }
}

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get back:&lt;/P&gt;&lt;PRE&gt;{
  "messages": {
    "message": [
      {
        "code": "E00003", 
        "text": "The element 'createTransactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'refId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."
      }
    ], 
    "resultCode": "Error"
  }
}&lt;/PRE&gt;&lt;P&gt;It looks to me that&amp;nbsp;refId is supposed to be an element in&amp;nbsp;createTransactionRequest - it is in the sample and it is in my test..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping there's a typo you might see that I didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 02:34:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55031#M29976</guid>
      <dc:creator>leehinde</dc:creator>
      <dc:date>2016-06-28T02:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error E00003 while testing json post</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55032#M29977</link>
      <description>&lt;P&gt;This is weird. I got past the above error by rearrainging how I built the json in the tool I'm using.&lt;/P&gt;&lt;PRE&gt;{
  "createTransactionRequest": {
    "merchantAuthentication": {
      "name": "7YJ9A2pkC98", 
      "transactionKey": "28S7jjRAvAYa953d"
    }, 
    "refId": "123456", 
    "transactionRequest": {
      "amount": 5, 
      "billTo": {
        "address": "15 Main Street", 
        "city": "Pecan Springs", 
        "company": "none", 
        "firstName": "Ellen", 
        "lastName": "Johnson", 
        "state": "TX", 
        "zip": "44628"
      }, 
      "payment": {
        "creditCard": {
          "cardCode": "999", 
          "cardNumber": "5424000000000015", 
          "expirationDate": "1220"
        }
      }, 
      "transactionSettings": {
        "setting": {
          "settingName": "testRequest", 
          "settingValue": "false"
        }
      }, 
      "transactionType": "authCaptureTransaction"
    }
  }
}&lt;/PRE&gt;&lt;P&gt;Same resulting json, but now it got past that error and then found a real error (I hadn't built the payment object correctly).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation implies (with a dot) that refID should be an element of the merchantAuthentication object, but the sample code, which works, doesn't build it that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it's complaining that the billTo isn't expected as part of the transactionRequest. It want's userFields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
	"messages": {
		"resultCode": "Error",
		"message": [
			{
				"code": "E00003",
				"text": "The element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'billTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'userFields' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'."
			}
		]
	}
}&lt;/PRE&gt;&lt;P&gt;What I'm learning is that (like a lot of code) what the error says may not be what the error means.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a successful transaction if I take out the billTo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 03:02:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55032#M29977</guid>
      <dc:creator>leehinde</dc:creator>
      <dc:date>2016-06-28T03:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error E00003 while testing json post</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55034#M29979</link>
      <description>&lt;P&gt;That look more like the xml error. On the xml, the node sequence have to be exact.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 11:46:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55034#M29979</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-06-28T11:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error E00003 while testing json post</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55040#M29985</link>
      <description>&lt;P&gt;Yes, it looks like XML based errors. I'm guessing there's some sort of translation going on. With JSON the order isn't supposed to be significant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's returning Content-Type: application/json; charset=utf-8 in the response and that's what I'm sending.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 18:24:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-E00003-while-testing-json-post/m-p/55040#M29985</guid>
      <dc:creator>leehinde</dc:creator>
      <dc:date>2016-06-28T18:24:47Z</dc:date>
    </item>
  </channel>
</rss>

