<?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 Accept hosted empty transaction response in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61630#M36053</link>
    <description>&lt;P&gt;I successfully implement your Accep Hosted example from github, but sometimes, not always, I cannot prorcess transaction response, as it returns empty:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;parent: "https://test.authorize.net/payment/payment"
​
qstr: "action=transactResponse&amp;amp;response={"&lt;BR /&gt;
SyntaxError: JSON.parse: end of data while reading object contents at line 1 column 2 of the JSON data&lt;/PRE&gt;&lt;P&gt;The transaction passes correctly, I recieve confirmation email, but I cannot process it on my side because the response is empty, or only "{".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated,&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 18:48:06 GMT</pubDate>
    <dc:creator>majod1</dc:creator>
    <dc:date>2018-02-12T18:48:06Z</dc:date>
    <item>
      <title>Accept hosted empty transaction response</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61630#M36053</link>
      <description>&lt;P&gt;I successfully implement your Accep Hosted example from github, but sometimes, not always, I cannot prorcess transaction response, as it returns empty:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;parent: "https://test.authorize.net/payment/payment"
​
qstr: "action=transactResponse&amp;amp;response={"&lt;BR /&gt;
SyntaxError: JSON.parse: end of data while reading object contents at line 1 column 2 of the JSON data&lt;/PRE&gt;&lt;P&gt;The transaction passes correctly, I recieve confirmation email, but I cannot process it on my side because the response is empty, or only "{".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated,&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 18:48:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61630#M36053</guid>
      <dc:creator>majod1</dc:creator>
      <dc:date>2018-02-12T18:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accept hosted empty transaction response</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61696#M36108</link>
      <description>&lt;P&gt;Now I can confirm the empty response is happening only in Firefox (v. 58b) and not in any other browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can submit a bugzilla report if anyone can confirm this is strictly Firefox related.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 12:29:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61696#M36108</guid>
      <dc:creator>majod1</dc:creator>
      <dc:date>2018-02-14T12:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accept hosted empty transaction response</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61716#M36128</link>
      <description>&lt;P&gt;This is solved:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason was that IFrameCommunicator didn't register the message event listener, until the iframe was loaded instantly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default iframe HTML code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div  id="iframe_holder" class="center-block" style="width:90%;max-width: 1000px"&amp;gt;
			&amp;lt;iframe id="load_payment" class="embed-responsive-item" name="load_payment" width="100%" height="650px" frameborder="0" scrolling="yes" hidden="true"&amp;gt;
			&amp;lt;/iframe&amp;gt;&lt;/PRE&gt;&lt;P&gt;And later JS code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$("#iframe_holder iframe").hide();&lt;/PRE&gt;&lt;P&gt;which sets&lt;/P&gt;&lt;PRE&gt;display:none&lt;/PRE&gt;&lt;P&gt;on the iframe. Removing this JS code and hidden="true" from iframe inline, the iframe now loads instantly and registers eventListener correctly. Without that, only this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (window.location.hash &amp;amp;&amp;amp; window.location.hash.length &amp;gt; 1) {
   callParentFunction(window.location.hash.substring(1));
 }&lt;/PRE&gt;&lt;P&gt;from IFrameCommunicator would run, which for some reason doesn't include the respone JSON.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 08:36:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/61716#M36128</guid>
      <dc:creator>majod1</dc:creator>
      <dc:date>2018-02-15T08:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accept hosted empty transaction response</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/62361#M36699</link>
      <description>&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i m using&amp;nbsp;&amp;nbsp;Authorize.net accept hosted form&amp;nbsp;&lt;SPAN&gt;but,&amp;nbsp; always, I cannot prorcess transaction&amp;nbsp;&lt;SPAN class="lia-search-match-lithium"&gt;response&lt;SPAN&gt;, as it returns empty:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;action=transactResponse&amp;amp;response={&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;also i have recvd email but why my&amp;nbsp;response not proper in&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ajax response&amp;nbsp; from&amp;nbsp;&lt;A href="https://test.authorize.net/payment/Api.ashx" target="_blank"&gt;test.authorize.net/payment/Api.ashx&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"resultCode":"Ok","messageCode":"Ok","transactionData":{"accountType":"Visa","accountNumber":"XXXX0130","transId":"60101095995","responseCode":"1","authorization":"V3DWUE","billTo":{"firstName":"Ellen","lastName":"Johnson","company":"Souveniropolis","address":"14 Main Street","city":"Pecan Springs","state":"TX","zip":"44628","country":"USA"},"totalAmount":"2.00","dateTime":"3/28/2018 9:31:21 AM"}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but after this i getting this error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;action=transactResponse&amp;amp;response={&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="tabbar"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Mar 2018 09:48:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/62361#M36699</guid>
      <dc:creator>ioiki</dc:creator>
      <dc:date>2018-03-28T09:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accept hosted empty transaction response</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/74493#M46303</link>
      <description>&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after severals days headache, confusing and depressing, we figured it out!&lt;BR /&gt;&lt;BR /&gt;this intermittent issue is due to how we(the integrator) use the hosted form, that is render hosted form too earlier cause listener not registered.&lt;BR /&gt;&lt;BR /&gt;inside the hosted form&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div _ngcontent-c0="" class="iFrameClass" id="divIframeCommunicator"&amp;gt;&amp;lt;/div&amp;gt; is not fully rendered.&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div _ngcontent-c0="" class="iFrameClass" id="divIframeCommunicator"&amp;gt;&amp;lt;iframe src="your_site_url" name="ifrmCommunicator" id="ifrmCommunicator"&amp;gt;&amp;lt;/iframe&amp;gt;&amp;lt;/div&amp;gt; the correctly one.&lt;BR /&gt;&lt;BR /&gt;the symptom is unable to receiveMessage but location.hash give truncated JSON like "#action=transactResponse&amp;amp;response={"&lt;BR /&gt;&lt;BR /&gt;also noticed their demo page in doc is a button to trigger post form token, where is an implied delay.&lt;BR /&gt;&lt;BR /&gt;when realized this the solution is simple, instead of do $("#send_token").submit(); in .ready() but do it in setTimeout with 1-2 seconds delay.&lt;BR /&gt;&lt;BR /&gt;now the hosted iframe working perfectly under Firefox, Chrome, Edge, IE11 and Opera&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;From avetticommerce&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 07:21:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Accept-hosted-empty-transaction-response/m-p/74493#M46303</guid>
      <dc:creator>Wei</dc:creator>
      <dc:date>2020-12-30T07:21:08Z</dc:date>
    </item>
  </channel>
</rss>

