<?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: JSON API Response ERROR in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59988#M34557</link>
    <description>&lt;P&gt;Thanks for that reply Aaron.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can certainly see the concern behind making a "breaking change" to the API response, but (IMO) if it is a change that complies to a universal standard, I think it would be widely understood.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick an easy solution would be to offer an argument, to the API call, that would allow the the return to give either version of the return, depending on the argument. Best of both worlds there.&lt;BR /&gt;&lt;BR /&gt;new API parameter: returnWithBOM&lt;BR /&gt;default value: TRUE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Doing that would keep existing (patched) systems running with the BOM, but would also allow for standards compliance, should the developer choose to pass in a value of "FALSE". Everyone happy as clams :D&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2017 15:15:47 GMT</pubDate>
    <dc:creator>jima</dc:creator>
    <dc:date>2017-09-21T15:15:47Z</dc:date>
    <item>
      <title>JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59351#M33943</link>
      <description>&lt;P&gt;While whipping up some code to directly use the API, I spent some time sussing out why the JSON response was crashing things. Turns out it's because it is returning a UTF-8+BOM character encoded string, which it definitely should not. As written in the RFC:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Implementations MUST NOT add a byte order mark to the beginning of a JSON text"&lt;BR /&gt;(&lt;A href="https://tools.ietf.org/html/rfc7159#section-8.1" target="_blank"&gt;https://tools.ietf.org/html/rfc7159#section-8.1&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;When coming here to make this post, I looked around in the forums and (almost) got excited when I saw this thread:&lt;BR /&gt;&lt;A href="https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185" target="_blank"&gt;https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But that excitement quickly vanished when I read that it was decided to NOT implement the fix. I would strongly encourage you to revert that decision, and actually DO implement the prescribed fix as your current implementation is not RFC compliant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Making the decision to NOT adhere to RFC standards just doesn't make sense, and costs developers untold (combined) hours of unnecessary troubleshooting time. PLEASE re-discuss this decision internally, and (hopefully) come down on the side to have your API conform to the RFC standards.&lt;BR /&gt;&lt;BR /&gt;For those that have come across this headache, here's a workaround for it, that *shouldn't* need to be done, but will work until A.net decides to make the change away from UTF-8+BOM.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;$tmp_bom = pack('H*','EFBBBF');
$result = preg_replace("/^$tmp_bom/", '', $result);
unset($tmp_bom);
$result = json_decode($result);&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Aug 2017 22:28:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59351#M33943</guid>
      <dc:creator>jima</dc:creator>
      <dc:date>2017-08-11T22:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59549#M34132</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can I say? I think you've personally hit on every single one of the existing pain points for people developing to our spec. I can't comment on the BOM issue and whether that would be fixed, but I can say I'm sorry you've been having so much trouble.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do really appreciate you taking the time to document it here for any else that may be afflicted. If I remember correctly, you're in Utah, right? If you ever want to head down to our office in Lehi where I'm located, lunch is on me.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 23:56:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59549#M34132</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-08-25T23:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59976#M34545</link>
      <description>&lt;P&gt;Could we at least get a reason for this highly irrational decision announced on&amp;nbsp;&lt;A href="https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185" target="_blank"&gt;https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185&lt;/A&gt; ?!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 11:04:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59976#M34545</guid>
      <dc:creator>winternet</dc:creator>
      <dc:date>2017-09-21T11:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59977#M34546</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21289"&gt;@jima&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think API returning json string with a special character i.e. &lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;amp;#65279;&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;... at the start of string .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response could be like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;amp;#65279;&lt;FONT color="#000000"&gt;{"messages":{"resultCode":"Error","message":[{"code":"E00003","text":"The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:expirationDate' element is invalid - The value XXXXX is invalid according to its datatype 'String' - The actual length is less than the MinLength value."}]}}&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;amp;#65279;&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;will be hidden as browser detect it as HTML entity....&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;please use inspect element and find the issue with the returning string ....&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;I think thats json_decode() returning &lt;STRONG&gt;NULL ...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;I &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Hope it will help ...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 11:58:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59977#M34546</guid>
      <dc:creator>sameer</dc:creator>
      <dc:date>2017-09-21T11:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59986#M34555</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/11580"&gt;@winternet&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Could we at least get a reason for this highly irrational decision announced on&amp;nbsp;&lt;A href="https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185" target="_blank"&gt;https://community.developer.authorize.net/t5/News-and-Announcements/Important-JSON-API-Response-Change/m-p/55370#M185&lt;/A&gt; ?!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Usage of the JSON API was too great, and it was determined that there was too high of a likelihood of breaking people's existing implementations in production. It's not that we thought people were explicitly depending on the BOM, but rather that their workarounds could cause their response parsing to break if the BOM&amp;nbsp;&lt;EM&gt;stopped&lt;/EM&gt; appearing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything's a tradeoff. With any web service or API, there's a constant struggle between making improvements/fixes and maintaining compatibility, and we generally have to go for the latter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a lot of lessons we've learned here. The most obvious is that if it had been done fully to spec in the initial release, we wouldn't have this problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another lesson: If we had made it clearer to developers that the JSON API was beta when it was first announced, we'd probably feel more comfortable making a potentially breaking change like this.&amp;nbsp; We asked developers to let us know if they were using the JSON API specifically so that we could inform them of changes. However, when it came time to discuss actually making a change, the actual usage of the API was many orders of magnitude higher than what would be coming from just the ones who had notified us. Maybe a little of that is on developers for not following our instructions, but I think at least some of that is on us for not making it clearer that there might be changes or actually gating the API to those who've registered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At that point, we could attempt to correlate the login IDs actually and contact the merchants directly to say "hey, we're about to make a potentially breaking change to your business", but that's a tough thing to do. Remember these are the login IDs&amp;nbsp;&lt;EM&gt;of the merchants&lt;/EM&gt;, not specifically the developers that created the integration. The best we can do in a situation like that is to say "contact whoever built your Authorize.Net integration and tell them to check on this". That's a tough sell, and no matter how we word it, not everyone will get the message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's one other benefit to registering for a&amp;nbsp;&lt;A href="http://developer.authorize.net/api/solution_id/" target="_blank"&gt;Solution ID&lt;/A&gt; if you're developing an integration to Authorize.Net.&amp;nbsp;If every developer writing something to our API used a Solution ID, we'd at least be able to know from every request who to contact in the case of trouble. Heck, we could have built the API to require a Solution ID in every request, and make every developer register to build an integration. That would give us a good list of developer contacts, but at the expense of making it a lot harder for a developer to get started. Again, everything's a tradeoff.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is perhaps more detail than you asked for, and more than I would usually share, but I feel strongly that without a good explanation, it&amp;nbsp;&lt;EM&gt;does&lt;/EM&gt; seem like an irrational decision. Hopefully, what I've shared will lead you to conclude that even if you would have chosen a different tradeoff, the decision was at least not made irrationally. I wasn't here when that decision was made,&amp;nbsp;but if I was, I suspect I would have been on the losing side of that argument. But, I'm confident that all of the ramifications were considered very thoroughly. Again, there's room to argue that this was the wrong decision, but it was at least very carefully considered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this goes without saying, but if not, I'll say it explicitly:&amp;nbsp;There will not be any weird BOM in the wrong place&amp;nbsp;in the next version of our API.&lt;/P&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 15:02:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59986#M34555</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-09-21T15:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59988#M34557</link>
      <description>&lt;P&gt;Thanks for that reply Aaron.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can certainly see the concern behind making a "breaking change" to the API response, but (IMO) if it is a change that complies to a universal standard, I think it would be widely understood.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick an easy solution would be to offer an argument, to the API call, that would allow the the return to give either version of the return, depending on the argument. Best of both worlds there.&lt;BR /&gt;&lt;BR /&gt;new API parameter: returnWithBOM&lt;BR /&gt;default value: TRUE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Doing that would keep existing (patched) systems running with the BOM, but would also allow for standards compliance, should the developer choose to pass in a value of "FALSE". Everyone happy as clams :D&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 15:15:47 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/59988#M34557</guid>
      <dc:creator>jima</dc:creator>
      <dc:date>2017-09-21T15:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/66482#M40016</link>
      <description>&lt;P&gt;Wow.. I just wasted a half-day on this. Go ahead and call me inexperienced, but dealing with this exact issue had me ready to sign into Bellevue. I'm working out of a word-press class, on a remote server, so debugging was painful to say the least. Not seeing hidden character(s) when outputting the response to a browser had me completely baffled. Thanks to OP (jima) here, and no thanks to Auth.net for chosing not to follow the standard.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 01:21:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/66482#M40016</guid>
      <dc:creator>madcolor</dc:creator>
      <dc:date>2019-02-21T01:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSON API Response ERROR</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/79373#M49924</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Cloud Storage uses the standard HTTP error reporting format for the JSON API. Successful requests return HTTP status codes in the 2xx range. Failed requests return status codes in the 4xx and 5xx ranges.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.myccpay.run/" target="_self"&gt;&lt;SPAN&gt;myccpay&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 06:35:05 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/JSON-API-Response-ERROR/m-p/79373#M49924</guid>
      <dc:creator>Langworth</dc:creator>
      <dc:date>2021-10-22T06:35:05Z</dc:date>
    </item>
  </channel>
</rss>

