<?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 E00007 / E_WC_21 User authentication failed in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-E-WC-21-User-authentication-failed/m-p/62733#M36995</link>
    <description>&lt;P&gt;I am trying out the Accept.js solution in Sandbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://jstest.authorize.net/v1/Accept.js&lt;/PRE&gt;&lt;P&gt;in my web page.&lt;/P&gt;&lt;P&gt;Doing everything as per tutorial (&lt;A 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;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the first step, where I should get the "opaque data"...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calling (in javascript):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Accept.dispatchData(secureData, responseHandlerAnet);&lt;/PRE&gt;&lt;P&gt;Secure data obj contains, as per tutorial, &lt;FONT face="terminal,monaco,monospace"&gt;authData&lt;/FONT&gt; and &lt;FONT face="terminal,monaco,monospace"&gt;cardData&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Of course, authData looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var authData = {
    apiLoginID: "MY_API_LOGIN_ID",
    clientKey: "MY_CLIENT_KEY",
};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The response in Chrome network inspector is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"messages":{"resultCode":"Error","message":[{"code":"E00007","text":"User authentication failed due to invalid authentication values."}]}}&lt;/PRE&gt;&lt;P&gt;but in javascript, in my handler function, is slightly different, shows another error code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"messages":{"resultCode":"Error","message":[{"code":"E_WC_21","text":"User authentication failed due to invalid authentication values."}]}}&lt;/PRE&gt;&lt;P&gt;Now, I have checked and re-checked my&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;apiLoginID&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;clientKey&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Chrome debugger, and network inspector, I see&amp;nbsp;the POST request being sent out (by Accept.js) like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;endpoint URL:&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;request payload generated by Accept.js:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;{"securePaymentContainerRequest":{"merchantAuthentication":{"name":"MY_API_LOGIN_ID","clientKey":"MY_CLIENT_KEY"},"data":{"type":"TOKEN","id":"351b4720-3c94-53ea-430b-36621f9cd865","token":{"cardNumber":"4012888818888","expirationDate":"122021","cardCode":"1234","zip":"90210","fullName":"Foghorn Leghorn"}}}}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to mention also, that&amp;nbsp;I can see in Chrome network inspector, another &lt;STRONG&gt;OPTIONS&lt;/STRONG&gt; call &lt;STRONG&gt;happening before the POST described above&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the header:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Request URL: https://apitest.authorize.net/xml/v1/request.api
Request Method: OPTIONS
Status Code: 200 OK
Remote Address: 184.86.39.203:443
Referrer Policy: no-referrer-when-downgrade&lt;/PRE&gt;&lt;P&gt;And this response is:&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;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 17:27:41 GMT</pubDate>
    <dc:creator>sid</dc:creator>
    <dc:date>2018-04-19T17:27:41Z</dc:date>
    <item>
      <title>E00007 / E_WC_21 User authentication failed</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-E-WC-21-User-authentication-failed/m-p/62733#M36995</link>
      <description>&lt;P&gt;I am trying out the Accept.js solution in Sandbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://jstest.authorize.net/v1/Accept.js&lt;/PRE&gt;&lt;P&gt;in my web page.&lt;/P&gt;&lt;P&gt;Doing everything as per tutorial (&lt;A 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;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the first step, where I should get the "opaque data"...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calling (in javascript):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Accept.dispatchData(secureData, responseHandlerAnet);&lt;/PRE&gt;&lt;P&gt;Secure data obj contains, as per tutorial, &lt;FONT face="terminal,monaco,monospace"&gt;authData&lt;/FONT&gt; and &lt;FONT face="terminal,monaco,monospace"&gt;cardData&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Of course, authData looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var authData = {
    apiLoginID: "MY_API_LOGIN_ID",
    clientKey: "MY_CLIENT_KEY",
};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The response in Chrome network inspector is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"messages":{"resultCode":"Error","message":[{"code":"E00007","text":"User authentication failed due to invalid authentication values."}]}}&lt;/PRE&gt;&lt;P&gt;but in javascript, in my handler function, is slightly different, shows another error code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"messages":{"resultCode":"Error","message":[{"code":"E_WC_21","text":"User authentication failed due to invalid authentication values."}]}}&lt;/PRE&gt;&lt;P&gt;Now, I have checked and re-checked my&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;apiLoginID&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;clientKey&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Chrome debugger, and network inspector, I see&amp;nbsp;the POST request being sent out (by Accept.js) like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;endpoint URL:&amp;nbsp;&lt;FONT face="terminal,monaco,monospace"&gt;&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;request payload generated by Accept.js:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;{"securePaymentContainerRequest":{"merchantAuthentication":{"name":"MY_API_LOGIN_ID","clientKey":"MY_CLIENT_KEY"},"data":{"type":"TOKEN","id":"351b4720-3c94-53ea-430b-36621f9cd865","token":{"cardNumber":"4012888818888","expirationDate":"122021","cardCode":"1234","zip":"90210","fullName":"Foghorn Leghorn"}}}}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to mention also, that&amp;nbsp;I can see in Chrome network inspector, another &lt;STRONG&gt;OPTIONS&lt;/STRONG&gt; call &lt;STRONG&gt;happening before the POST described above&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the header:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Request URL: https://apitest.authorize.net/xml/v1/request.api
Request Method: OPTIONS
Status Code: 200 OK
Remote Address: 184.86.39.203:443
Referrer Policy: no-referrer-when-downgrade&lt;/PRE&gt;&lt;P&gt;And this response is:&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;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 17:27:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-E-WC-21-User-authentication-failed/m-p/62733#M36995</guid>
      <dc:creator>sid</dc:creator>
      <dc:date>2018-04-19T17:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: E00007 / E_WC_21 User authentication failed</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-E-WC-21-User-authentication-failed/m-p/62743#M37005</link>
      <description>&lt;P&gt;Well, after one day of scratching my head, I basically kept reading forum posts, and reviewed my code... ALL OF A SUDDEN THE TEST API RESPONDS PROPERLY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, no extra code changes on my side... the test API started responding properly... looks like lots of unstable code on authorize.net side... I'm gonna stop here!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 20:05:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/E00007-E-WC-21-User-authentication-failed/m-p/62743#M37005</guid>
      <dc:creator>sid</dc:creator>
      <dc:date>2018-04-19T20:05:13Z</dc:date>
    </item>
  </channel>
</rss>

