<?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: Authorize.NET C# SDK Bugs in Community Feedback</title>
    <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/36741#M233</link>
    <description>&lt;P&gt;Apologies for reviving an old thread, and if this has already been reported elsewhere, but it still appears to be an issue in the current C# SDK available for download.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There seems to be a bug in the constructor for&amp;nbsp;CardPresentPriorAuthCapture. This constructor takes an (amount) parameter, which the documentation states will be passed as the final amount to capture:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    public class CardPresentPriorAuthCapture:GatewayRequest {
        /// &amp;lt;summary&amp;gt;
        /// Initializes a new instance of the &amp;lt;see cref="CardPresentPriorAuthCapture"/&amp;gt; class.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="transactionID"&amp;gt;The transaction ID.&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="amount"&amp;gt;The amount.&amp;lt;/param&amp;gt;
        public CardPresentPriorAuthCapture(string transactionID, decimal amount) {
            this.SetApiAction(RequestAction.PriorAuthCapture);
            this.Queue("x_ref_trans_id", transactionID);
        }
    }&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;However, as you can see, the constructor never does anything with the "amount" parameter, so it is never actually passed to the gateway. Consequently, the originally-authorized amount is captured instead of the specified amount. Obviously, this is a huge problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;If there's a better place to report these issues (I have run into quite a few with this SDK) please let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2013 17:25:45 GMT</pubDate>
    <dc:creator>bschoenbeck</dc:creator>
    <dc:date>2013-11-12T17:25:45Z</dc:date>
    <item>
      <title>Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/11998#M122</link>
      <description>&lt;P&gt;Hey Guys,&lt;BR /&gt;&lt;BR /&gt;Can you fix at least the following bugs in your SDK:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;AuthorizeNet.CustomerGateway.AddCreditCard(...)&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Replace:&lt;/P&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;card.expirationDate&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;string&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;.Format(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;"{0}-{1}"&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;,&amp;nbsp;expirationYear.ToString(),&amp;nbsp;expirationMonth.ToString());&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;With:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;card.expirationDate&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;.Format(expirationYear&amp;nbsp;&amp;gt;&amp;nbsp;99&amp;nbsp;?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;"{0:D2}-{1:D4}"&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;"{0:D2}-{1:D2}"&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;,&amp;nbsp;expirationMonth,&amp;nbsp;expirationYear);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;AuthorizeNet.CustomerGateway.UpdateCustomer(...)&lt;BR /&gt;&lt;BR /&gt;After:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&amp;nbsp;req&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;updateCustomerProfileRequest&lt;/SPAN&gt;();&lt;/STRONG&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Add:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;req.profile&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;customerProfileExType&lt;/SPAN&gt;();&lt;BR /&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;STRONG&gt;AuthorizeNet.PaymentProfile.ToAPI(...)&lt;BR /&gt;&lt;BR /&gt;After:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;STRONG&gt;result.customerPaymentProfileId&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;this&lt;/SPAN&gt;.ProfileID;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;BR /&gt;Add:&lt;BR /&gt;&lt;PRE&gt;result.payment&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;paymentType&lt;/SPAN&gt;();&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 14 Apr 2011 18:48:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/11998#M122</guid>
      <dc:creator>koistya</dc:creator>
      <dc:date>2011-04-14T18:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12190#M124</link>
      <description>&lt;P&gt;Hey there, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the heads up. For each of these bugs, can you please provide a little more detail so our development teams can look into them further? Can you describe the problem you're seeing with each that led you to make these changes? &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;Michelle&lt;/P&gt;
&lt;P&gt;Developer Community Manager&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 22:57:52 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12190#M124</guid>
      <dc:creator>Michelle</dc:creator>
      <dc:date>2011-04-21T22:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12284#M125</link>
      <description>&lt;P&gt;For example, the first one can't handle dates with months from &amp;nbsp;January to September. For example if you send a Year = 2011 and a Month = 2 to the API method, it will generate "2011-2" string which your service doesn't understand, and if change it to "2011-02", then request goes smoothly, thats why {1: D2} should be used instead of {1} withing String.Format(..) there for a month.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Other spots in the SDK code throw NullReference exception making it's impossible to use CIM which is not possible to fix without patching your C# SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general the code quality of this C# SDK is extremly low.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2011 23:36:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12284#M125</guid>
      <dc:creator>koistya</dc:creator>
      <dc:date>2011-04-25T23:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12328#M128</link>
      <description>&lt;P&gt;Along these lines, create unit tests for the SDK so that you can verify that everything is actually functional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2011 19:15:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12328#M128</guid>
      <dc:creator>clively</dc:creator>
      <dc:date>2011-04-26T19:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12670#M132</link>
      <description>&lt;P&gt;Thanks koistya and clively. I have passed on your findings to our development folk so they can make any necessary changes with the next revision.&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;Michelle&lt;/P&gt;
&lt;P&gt;Developer Community Manager&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2011 20:09:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12670#M132</guid>
      <dc:creator>Michelle</dc:creator>
      <dc:date>2011-05-05T20:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12996#M138</link>
      <description>&lt;P&gt;Thanks koistya, you saved me a lot of debugging time with those fixes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add that the expiration date needs to have the year first: YYYY-MM&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the line should be:&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;card.expirationDate&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;.Format(expirationYear&amp;nbsp;&amp;gt;&amp;nbsp;99&amp;nbsp;?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;"{0:D4}-{1:D2}"&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;"{0:D2}-{1:D2}"&lt;/SPAN&gt;&lt;FONT face="monospace"&gt;&lt;SPAN&gt;,&amp;nbsp;expirationYear,&amp;nbsp;expirationMonth);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 May 2011 21:17:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/12996#M138</guid>
      <dc:creator>emendez77</dc:creator>
      <dc:date>2011-05-19T21:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/13168#M145</link>
      <description>&lt;P&gt;Here's another problem in the C# SDK that I stumbled on recently...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using ServiceMode.Live, it makes logical sense to me that the method CustomerGateway.AddCreditCard should perform validation on the credit card data before saving it and creating a new payment profile. &amp;nbsp;However, looking at the implementation for AddCreditCard, one can see that createCustomerPaymentProfileRequest.validationMode is never set based on the type of ServiceMode given to the CustomerGateway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be one way to fix the problem:&lt;/P&gt;&lt;PRE&gt;req.validationModeSpecified = true;
req.validationMode = this._mode == ServiceMode.Test ? validationModeEnum.testMode : validationModeEnum.liveMode;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 May 2011 16:26:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/13168#M145</guid>
      <dc:creator>Location3</dc:creator>
      <dc:date>2011-05-26T16:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/36741#M233</link>
      <description>&lt;P&gt;Apologies for reviving an old thread, and if this has already been reported elsewhere, but it still appears to be an issue in the current C# SDK available for download.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There seems to be a bug in the constructor for&amp;nbsp;CardPresentPriorAuthCapture. This constructor takes an (amount) parameter, which the documentation states will be passed as the final amount to capture:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    public class CardPresentPriorAuthCapture:GatewayRequest {
        /// &amp;lt;summary&amp;gt;
        /// Initializes a new instance of the &amp;lt;see cref="CardPresentPriorAuthCapture"/&amp;gt; class.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="transactionID"&amp;gt;The transaction ID.&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="amount"&amp;gt;The amount.&amp;lt;/param&amp;gt;
        public CardPresentPriorAuthCapture(string transactionID, decimal amount) {
            this.SetApiAction(RequestAction.PriorAuthCapture);
            this.Queue("x_ref_trans_id", transactionID);
        }
    }&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;However, as you can see, the constructor never does anything with the "amount" parameter, so it is never actually passed to the gateway. Consequently, the originally-authorized amount is captured instead of the specified amount. Obviously, this is a huge problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;If there's a better place to report these issues (I have run into quite a few with this SDK) please let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 16px;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 17:25:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/36741#M233</guid>
      <dc:creator>bschoenbeck</dc:creator>
      <dc:date>2013-11-12T17:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Authorize.NET C# SDK Bugs</title>
      <link>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/40184#M241</link>
      <description>&lt;P&gt;This issue has been resolved and an updated SDK is available from GitHub:&amp;nbsp;&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-dotnet&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RIchard&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:43:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Community-Feedback/Authorize-NET-C-SDK-Bugs/m-p/40184#M241</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2014-04-02T13:43:44Z</dc:date>
    </item>
  </channel>
</rss>

