<?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: C# display response message for ChargeCreditCard in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54733#M29693</link>
    <description>&lt;P&gt;So what is the best way to get at the complete response info? I would like to also retrieve response.transactionResponse.transId.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When calling the controller like this:&lt;/P&gt;&lt;P&gt;var r = ChargeCreditCard.Run(strAuthNetLogin, strAuthNetTransKey, CartTotal);&lt;/P&gt;&lt;P&gt;I can only retrieve response info such as r.messages.message[0].text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to retrieve r.transactionResponse.transId I get the error: "ANetAPIResponse does not contain a definition for 'transactionResponse'..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2016 14:14:14 GMT</pubDate>
    <dc:creator>pb100</dc:creator>
    <dc:date>2016-05-25T14:14:14Z</dc:date>
    <item>
      <title>C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54728#M29688</link>
      <description>&lt;P&gt;Hi there...Upgrading to the new ASP.NET code using the ChargeCreditCard AuthNet API. Everything works except I need to display the response message to the user, especially if the transaction fails. The API code only writes the message to the console. How can I display the response message to the user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: from my page code behind, I call ChargeCreditCard.Run(strAuthNetLogin, strAuthNetTransKey, CartTotal);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample code includes "return response;" but I cannot seem to get the proper syntax to access that info outside of the call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 10:14:17 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54728#M29688</guid>
      <dc:creator>pb100</dc:creator>
      <dc:date>2016-05-25T10:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54730#M29690</link>
      <description>&lt;P&gt;when you run debug, what is in "response"?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 11:51:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54730#M29690</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-05-25T11:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54731#M29691</link>
      <description>&lt;P&gt;hi there...&lt;/P&gt;&lt;P&gt;"AuthorizeNet.Api.Contracts.V1.ChargeCreditCardResponse"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the sample code: &lt;A href="https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/ChargeCreditCard.cs" target="_blank"&gt;https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/ChargeCreditCard.cs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can call the process with var r = ChargeCreditCard.Run(.....) and then display r.messages.message[0].code + "&amp;nbsp; " + r.messages.message[0].text. There is additional info in the response that I am unable to get to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a more complete example beyond what is on Github?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 12:07:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54731#M29691</guid>
      <dc:creator>pb100</dc:creator>
      <dc:date>2016-05-25T12:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54732#M29692</link>
      <description>&lt;P&gt;not really, but you got the source code, so you could look at those.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 14:08:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54732#M29692</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-05-25T14:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54733#M29693</link>
      <description>&lt;P&gt;So what is the best way to get at the complete response info? I would like to also retrieve response.transactionResponse.transId.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When calling the controller like this:&lt;/P&gt;&lt;P&gt;var r = ChargeCreditCard.Run(strAuthNetLogin, strAuthNetTransKey, CartTotal);&lt;/P&gt;&lt;P&gt;I can only retrieve response info such as r.messages.message[0].text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to retrieve r.transactionResponse.transId I get the error: "ANetAPIResponse does not contain a definition for 'transactionResponse'..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 14:14:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54733#M29693</guid>
      <dc:creator>pb100</dc:creator>
      <dc:date>2016-05-25T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54737#M29697</link>
      <description>&lt;P&gt;r is the transaction response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AuthorizeNet/sample-code-csharp/blob/cc84949ba884d8f0315a149ac0daf0a3e48f5d1e/SampleCodeTest/TestRunner.cs" target="_blank"&gt;https://github.com/AuthorizeNet/sample-code-csharp/blob/cc84949ba884d8f0315a149ac0daf0a3e48f5d1e/SampleCodeTest/TestRunner.cs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public ANetApiResponse TestAuthorizeCreditCard()
        {
            var response = (createTransactionResponse)AuthorizeCreditCard.Run(apiLoginId, transactionKey, GetAmount());
            return response;
        }&lt;/PRE&gt;&lt;P&gt;try it as a createtransactionresponse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 22:08:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54737#M29697</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2016-05-25T22:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: C# display response message for ChargeCreditCard</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54791#M29750</link>
      <description>&lt;P&gt;Thanks so much! Will give this a try.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 12:22:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-display-response-message-for-ChargeCreditCard/m-p/54791#M29750</guid>
      <dc:creator>pb100</dc:creator>
      <dc:date>2016-06-02T12:22:36Z</dc:date>
    </item>
  </channel>
</rss>

