<?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: Expecting, but not receiving Duplicate Transaction Error using AIM in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17600#M9823</link>
    <description>&lt;P&gt;The timeout value is mine. I set x_duplicate_window﻿ to 120 seconds.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Oct 2011 13:43:37 GMT</pubDate>
    <dc:creator>exposites</dc:creator>
    <dc:date>2011-10-03T13:43:37Z</dc:date>
    <item>
      <title>Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17576#M9811</link>
      <description>&lt;P&gt;I see other posts on this message board asking why they are receiving duplicate transaction error messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the opposite problem. I don't get the message when I expect to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use AIM, and every now and then, I post a transaction request, but don't receive a response before a 30 second timeout period. As a result, I don't know if Authorize.net received the request, authorized it or denied it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code handles this exception by resubmitting the exact same request (containing the x_duplicate_window﻿ field with a 2 minute value) and checking for the duplicate transaction response. If it receives the duplicate transaction response, it returns back the authorization data from the initial transaction. If it doesn't receive the duplicate transaction response, it processes the response as if it were the initial response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In testing, when I force the timeout exception and the identical transaction gets resubmitted, I don't receive the duplicate transaction response, even though I see in the administrative interface that the first transaction successfully authorized. As a result, the card gets double charged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some psuedo code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Attempt the Post&lt;/LI&gt;&lt;LI&gt;If a timeout exception occurs, then&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; Attempt the Post again with the same data as the first post&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; Parse out the Response Code, Reason Code, and Reason&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; If the Response Code = 3 and the Reason Code = 11 Then&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assign the value 1 to the Response Code and assigned the value 1 to the Reason Code&lt;/LI&gt;&lt;LI&gt;Process the data from the response&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;My problem is that, even though the first post's transaction gets authorized, the reponse code and reason code response from the second post both contain the value 1, instead of 3 and 11 as I expect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried adding a 30 second delay between the firsts and second posts thinking it may take Authorize.net a little while to "see" the first transaction, but that didn''t help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone offer any other suggestions?&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;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2011 20:11:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17576#M9811</guid>
      <dc:creator>exposites</dc:creator>
      <dc:date>2011-10-02T20:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17582#M9814</link>
      <description>&lt;P&gt;It all the fields the same? Here is the list&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://community.developer.authorize.net/t5/Integration-and-Testing/Duplicate-Transactions-AIM/m-p/285/message-uid/285/highlight/true#U285"&gt;http://community.developer.authorize.net/t5/Integration-and-Testing/Duplicate-Transactions-AIM/m-p/285/message-uid/285/highlight/true#U285&lt;/A&gt;﻿&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2011 22:18:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17582#M9814</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-10-02T22:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17584#M9815</link>
      <description>&lt;P&gt;Yes, the fields are identical.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 03:25:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17584#M9815</guid>
      <dc:creator>exposites</dc:creator>
      <dc:date>2011-10-03T03:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17588#M9817</link>
      <description>&lt;P&gt;Is the timeout on Authorize.net's end or yours? Would it help to go into your PHP.ini and configure a larger timeout value?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 05:36:04 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17588#M9817</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-10-03T05:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17600#M9823</link>
      <description>&lt;P&gt;The timeout value is mine. I set x_duplicate_window﻿ to 120 seconds.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 13:43:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17600#M9823</guid>
      <dc:creator>exposites</dc:creator>
      <dc:date>2011-10-03T13:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17632#M9839</link>
      <description>&lt;P&gt;How about just submit the same transaction twice in a row in code, without the fake timeout exception and see if you get 2 transaction on the administrative interface﻿. Can you also show us your all your code.&lt;/P&gt;&lt;P&gt;If that still get duplicate transaction, it will be time to call support to have them look at it.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 18:51:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17632#M9839</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-10-03T18:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expecting, but not receiving Duplicate Transaction Error using AIM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17648#M9847</link>
      <description>&lt;P&gt;RaynorC1emen7,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your suggestion and submitted the same transaction twice in a row. Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.CommaText := HTTPClient.Post('&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll',"&gt;https://secure.authorize.net/gateway/transact.dll',&lt;/A&gt; Request);&lt;BR /&gt;﻿&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.CommaText := HTTPClient.Post('&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll',"&gt;https://secure.authorize.net/gateway/transact.dll',&lt;/A&gt; Request);&lt;BR /&gt;﻿&lt;/P&gt;&lt;P&gt;Then I went to the administrative interface and saw that there were indeed two transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first glance, they appeared identical. After closer inspection, however, a space in one of the fields got URL encoded to a %20 in the second request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the HTTPClient.Post call modified the Request variable, so when I used it a second time, it wasn't identical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I adjusted the code to preserve the value of the original Request varaible and used the copy on the second HTTPClient.Post call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now everything works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks everyone for your very helpful suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2011 01:32:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Expecting-but-not-receiving-Duplicate-Transaction-Error-using/m-p/17648#M9847</guid>
      <dc:creator>exposites</dc:creator>
      <dc:date>2011-10-04T01:32:08Z</dc:date>
    </item>
  </channel>
</rss>

