<?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: getTransactionDetailsRequest unexpected character in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/getTransactionDetailsRequest-unexpected-character/m-p/60383#M34919</link>
    <description>&lt;P&gt;A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form. In this case, the initial BOM is only used as a signature — an indication that an otherwise unmarked JSON response is in UTF-8. Although not necessary, it was determined that there was too high of a likelihood of breaking people's existing implementations in production, if the BOM stopped appearing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the next version of the API, there should not be a BOM in the wrong place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the mean time, if it is a problem for you, just be aware of it and parse it out.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 10:35:20 GMT</pubDate>
    <dc:creator>NexusSoftware</dc:creator>
    <dc:date>2017-11-07T10:35:20Z</dc:date>
    <item>
      <title>getTransactionDetailsRequest unexpected character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/getTransactionDetailsRequest-unexpected-character/m-p/60360#M34906</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using the&amp;nbsp;getTransactionDetailsRequest there appears to be an unexpected character returning from the request which is causing issues trying to parse the JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a javascript example which can re-create the problem if you fill in the 3 fields that I have removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var r = require('request-promise');

var f = {
  "getTransactionDetailsRequest": {
    "merchantAuthentication": {
      "name": *NAME*",
      "transactionKey": *TRANSACTION_KEY*
    },
    "transId": *TRANS_ID*
  }
};

var options = {
  url: 'https://apitest.authorize.net/xml/v1/request.api', 
  method: 'POST',
  body: f,
  json: true,
}
r(options)
.then(function(res) {
  console.log(
    'Mystery Character: Unicode', require('diff').diffChars(res, res.trim())[0].value.charCodeAt(0)
  );
})&lt;/PRE&gt;&lt;P&gt;The character that appears at the very start of the string is:&amp;nbsp;&lt;A href="http://www.fileformat.info/info/unicode/char/feff/index.htm" target="_blank"&gt;http://www.fileformat.info/info/unicode/char/feff/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you consider this a bug?&lt;/P&gt;&lt;P&gt;Is this already tracked?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:58:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/getTransactionDetailsRequest-unexpected-character/m-p/60360#M34906</guid>
      <dc:creator>pp_me</dc:creator>
      <dc:date>2017-11-06T16:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: getTransactionDetailsRequest unexpected character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/getTransactionDetailsRequest-unexpected-character/m-p/60383#M34919</link>
      <description>&lt;P&gt;A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form. In this case, the initial BOM is only used as a signature — an indication that an otherwise unmarked JSON response is in UTF-8. Although not necessary, it was determined that there was too high of a likelihood of breaking people's existing implementations in production, if the BOM stopped appearing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the next version of the API, there should not be a BOM in the wrong place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the mean time, if it is a problem for you, just be aware of it and parse it out.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 10:35:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/getTransactionDetailsRequest-unexpected-character/m-p/60383#M34919</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-11-07T10:35:20Z</dc:date>
    </item>
  </channel>
</rss>

