<?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: Accept.js OPTIONS  E00003 Root element is missing. in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57503#M32221</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21482"&gt;@dmeganoski&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry about the error in the example. We've already fixed it on our end, and are just waiting for the next site update. Also addressed &lt;A href="https://community.developer.cybersource.com/t5/Integration-and-Testing/getting-an-error-with-the-new-accept-js-solution/m-p/57489/highlight/true#M32208" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 15:17:26 GMT</pubDate>
    <dc:creator>Aaron</dc:creator>
    <dc:date>2017-04-03T15:17:26Z</dc:date>
    <item>
      <title>Accept.js OPTIONS  E00003 Root element is missing.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/56886#M31662</link>
      <description>&lt;P&gt;I followed the example shown on&amp;nbsp;&lt;A title="Integrating Accept.js into Your Website" href="https://developer.authorize.net/api/reference/features/acceptjs.html" target="_blank"&gt;https://developer.authorize.net/api/reference/features/acceptjs.html&lt;/A&gt;&amp;nbsp;into my php page form but&amp;nbsp;when I process&amp;nbsp;the form with&lt;/P&gt;&lt;PRE&gt;Accept.dispatchData(secureData, responseHandler);&lt;/PRE&gt;&lt;P&gt;It generates an OPTIONS error response of :&lt;/P&gt;&lt;PRE&gt;{
  "messages": {
    "resultCode": "Error",
    "message": [
      "code": "E00003",
      "text": "Root element is missing."
    ]
  }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The secureData being submitted (in case it matters) is:&lt;/P&gt;&lt;PRE&gt;{
  "cardData": {
    "cardNumber": "4111111111111111",
    "month": "02",
    "year": "2018",
    "zip": "83854",
    "fullname": "Lisa Smith �"
  },
  "authData": {
    "clientKey": "2w77y4wpDGw89R8bM2VcRS4Bm69tQ6qLYT5ACbq9E2uBW9wgVqPAzXADfdC8kqLz",
    "apiLoginID": "72R9aMvP"
  }
}&lt;/PRE&gt;&lt;P&gt;I checked and made sure the sandbox key and login id are correct.&lt;/P&gt;&lt;P&gt;I also get a POST response from apitest.authorize.net:&lt;/P&gt;&lt;PRE&gt;{
  "opaqueData": {
    "dataDescriptor": "COMMON.ACCEPT.INAPP.PAYMENT",
    "dataValue": "9486742822834605004604"
  },
  "messages": {
    "resultCode": "Ok",
    "message": [
      "code": "I00001",
      "text": "Successful."
    ]
  }
}&lt;/PRE&gt;&lt;P&gt;but since the OPTIONS returned an error it does not call the responseHandler() routine.&lt;/P&gt;&lt;P&gt;I hope I have included enough information for someone to see and help with a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other thing. The console also shows a message:&lt;/P&gt;&lt;PRE&gt;TypeError: window[b] is not a function  AcceptCore.js:1:3956
  n  https://jstest.authorize.net/v1/AcceptCore.js:1:3956
  o/c.onload/&amp;lt;  https://jstest.authorize.net/v1/AcceptCore.js:1:4265&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:57:04 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/56886#M31662</guid>
      <dc:creator>wdbaker54</dc:creator>
      <dc:date>2017-02-10T16:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Accept.js OPTIONS  E00003 Root element is missing.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/56887#M31663</link>
      <description>&lt;P&gt;I did a bit more fiddling and realized that the function being called in&amp;nbsp;Accept.dispatchData() needed to be quoted - it isn't supposed to be a pointer. It now calls the response handler but I still get that OPTIONS error but I assume that it will not interfere with the process.&lt;/P&gt;&lt;P&gt;The OPTIONS error is something I will ignore for now.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 17:09:01 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/56887#M31663</guid>
      <dc:creator>wdbaker54</dc:creator>
      <dc:date>2017-02-10T17:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accept.js OPTIONS  E00003 Root element is missing.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57186#M31917</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/1928"&gt;@wdbaker54&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just a heads up for you and anyone watching this thread that we've released code in sandbox that fixes many of the issues brought up here, and this code should make it into the production environment within the next couple of days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically for Accept.js, there's no longer any "Access-Control-Allow-Origin" related error in the console, the accept.js script can now be loaded at any point in the workflow, and the response handler function can be passed directly in the function call instead of having to pass the name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, please let us know if anything's not working as expected!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 23:53:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57186#M31917</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-03-07T23:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Accept.js OPTIONS  E00003 Root element is missing.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57502#M32220</link>
      <description>&lt;P&gt;I was also having this issue, and it seems to be related to the second function (processTransaction).&lt;BR /&gt;&lt;BR /&gt;Wrapping the callback function in parenthesis did not work for me, in fact it caused the error:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;TypeError: window[b] is not a function  AcceptCore.js:1:3956
  n  https://jstest.authorize.net/v1/AcceptCore.js:1:3956
  o/c.onload/&amp;lt;  https://jstest.authorize.net/v1/AcceptCore.js:1:4265&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;So I'm guessing that was changed so it does indeed expect a literal reference, not a string.&lt;BR /&gt;&lt;BR /&gt;Apparently, this callback is being wrapped in a try / catch block inside the Accept.js script, which is preventing any default javascript errors from appearing in the console, and it seems the example has some invalid javascript within it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Commenting out the default form creation and submission not only allowed the function to execute all the way to the bottom, but eliminated&amp;nbsp;the second call to 'OPTIONS'.&lt;BR /&gt;&lt;BR /&gt;Further investigation led me to find the problem:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;        amount.value = document.getElementById('AMOUNT').value;&lt;/PRE&gt;&lt;P&gt;The example code contains an amount field, however the id is actually all lower case. This results in an&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Uncaught TypeError: Cannot read property 'value' of null&lt;/PRE&gt;&lt;P&gt;That is caught but never passed to the user.&lt;BR /&gt;&lt;BR /&gt;Basically, someone needs to change 'AMOUNT' to 'amount' in the docs.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 15:10:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57502#M32220</guid>
      <dc:creator>dmeganoski</dc:creator>
      <dc:date>2017-04-03T15:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Accept.js OPTIONS  E00003 Root element is missing.</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57503#M32221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21482"&gt;@dmeganoski&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry about the error in the example. We've already fixed it on our end, and are just waiting for the next site update. Also addressed &lt;A href="https://community.developer.cybersource.com/t5/Integration-and-Testing/getting-an-error-with-the-new-accept-js-solution/m-p/57489/highlight/true#M32208" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 15:17:26 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-js-OPTIONS-E00003-Root-element-is-missing/m-p/57503#M32221</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-04-03T15:17:26Z</dc:date>
    </item>
  </channel>
</rss>

