<?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 Detecting a failed authorization in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/62556#M36846</link>
    <description>&lt;P&gt;We are having some issues handeling the return transactionResponse to detect failed Transactions. At first we were just tesing for a response code of 2, but found that a decline isnt the only return for a failed transaction. So we decided to go with testing if the authcode was all 0s, or null to check for failed transactions. That does not seem to work as a declined transaction came back with a authCode that was neither all zeros or null but a six digit integer.&amp;nbsp;What&amp;nbsp;different scenarios and checks would we need to do to detect a failed authorization? C# sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(response.messages.resultCode == messageTypeEnum.Error) throw new Exception("OrderCreditCardController.CapturePayment: " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AuthorizeCode = response.transactionResponse.authCode;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//checks for null and All zeros&lt;/P&gt;&lt;P&gt;if (!IsAuthorizeCodeValid(AuthorizeCode)) throw new Exception("OrderCreditCardController.AuthorizePayment:" + response.transactionResponse.responseCode + " " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 20:30:11 GMT</pubDate>
    <dc:creator>johnnyc</dc:creator>
    <dc:date>2018-04-06T20:30:11Z</dc:date>
    <item>
      <title>Detecting a failed authorization</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/62556#M36846</link>
      <description>&lt;P&gt;We are having some issues handeling the return transactionResponse to detect failed Transactions. At first we were just tesing for a response code of 2, but found that a decline isnt the only return for a failed transaction. So we decided to go with testing if the authcode was all 0s, or null to check for failed transactions. That does not seem to work as a declined transaction came back with a authCode that was neither all zeros or null but a six digit integer.&amp;nbsp;What&amp;nbsp;different scenarios and checks would we need to do to detect a failed authorization? C# sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(response.messages.resultCode == messageTypeEnum.Error) throw new Exception("OrderCreditCardController.CapturePayment: " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AuthorizeCode = response.transactionResponse.authCode;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//checks for null and All zeros&lt;/P&gt;&lt;P&gt;if (!IsAuthorizeCodeValid(AuthorizeCode)) throw new Exception("OrderCreditCardController.AuthorizePayment:" + response.transactionResponse.responseCode + " " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 20:30:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/62556#M36846</guid>
      <dc:creator>johnnyc</dc:creator>
      <dc:date>2018-04-06T20:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting a failed authorization</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/62559#M36849</link>
      <description>&lt;P&gt;Why not check if the responseCode is !=1 for a declined&amp;nbsp;transaction or&amp;nbsp;&lt;SPAN&gt;transId &amp;gt; 0 for an approved transaction&lt;/SPAN&gt;?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 21:18:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/62559#M36849</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2018-04-07T21:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting a failed authorization</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/64742#M38560</link>
      <description>&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;A href="https://www.krogerfeedback.us" target="_blank"&gt;&lt;FONT color="#000000"&gt;krogerfeedback&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/24037"&gt;@johnnyc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We are having some issues handeling the return transactionResponse to detect failed Transactions. At first we were just tesing for a response code of 2, but found that a decline isnt the only return for a failed transaction. So we decided to go with testing if the authcode was all 0s, or null to check for failed transactions. That does not seem to work as a declined transaction came back with a authCode that was neither all zeros or null but a six digit integer.&amp;nbsp;What&amp;nbsp;different scenarios and checks would we need to do to detect a failed authorization? C# sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(response.messages.resultCode == messageTypeEnum.Error) throw new Exception("OrderCreditCardController.CapturePayment: " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AuthorizeCode = response.transactionResponse.authCode;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//checks for null and All zeros&lt;/P&gt;&lt;P&gt;if (!IsAuthorizeCodeValid(AuthorizeCode)) throw new Exception("OrderCreditCardController.AuthorizePayment:" + response.transactionResponse.responseCode + " " + GetResponseMessage(response));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Thank goodness i have found someone else experiencing the same problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 10:22:39 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Detecting-a-failed-authorization/m-p/64742#M38560</guid>
      <dc:creator>Roelofje975</dc:creator>
      <dc:date>2018-10-11T10:22:39Z</dc:date>
    </item>
  </channel>
</rss>

