<?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: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65436#M39106</link>
    <description>&lt;P&gt;I started having the same problem with orderType when I recently tried to switch to using the dotnet core sdk in beta (&lt;A href="https://github.com/AuthorizeNet/dotnet-core-sdk-beta" target="_blank"&gt;https://github.com/AuthorizeNet/dotnet-core-sdk-beta&lt;/A&gt;). I had previously been using the dotnet sdk and did not experience the problem in version 1.9.6 and 1.9.7 (&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-dotnet&lt;/A&gt;). I’ve added an issue to the dotnet core sdk with some extra details (&lt;A href="https://github.com/AuthorizeNet/dotnet-core-sdk-beta/issues/11" target="_blank"&gt;https://github.com/AuthorizeNet/dotnet-core-sdk-beta/issues/11&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarize, the problem I have seems to be caused by the members of the orderType class. In the dotnet core sdk the class has many fields that do not exist in the dotnet sdk, such as discountAmount and purchaseOrderDateUTC. These fields are not nullable and so they get sent along with default values even if you are only setting orderType invoiceNumber or description. I can only assume this causes a problem in Authorize.Net’s system because those fields are not part of the API (&lt;A href="https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page" target="_blank"&gt;https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a blocking problem preventing us from using the dotnet core sdk. Can we get an idea of when this will be resolved? Also the sdk is still in beta, but the code repository has modifications in it from 2 years ago. Is there a reason it is still in beta, and when can we expect it will be available for use in production?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Dec 2018 22:41:15 GMT</pubDate>
    <dc:creator>mwrightmcci</dc:creator>
    <dc:date>2018-12-21T22:41:15Z</dc:date>
    <item>
      <title>OrderType is causing Unexpected error during Payment withour ordertype payment working successful</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65309#M38996</link>
      <description>&lt;P&gt;I would like to know if there are any dependencies or relationship exists with OrderType while creating CreateAnHostedPaymentPage.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reason being, when I dont add OrderType with OrderId, payment is successful&lt;/P&gt;&lt;P&gt;When I add OrderType with OrderId, I get unexpected error when I click on Pay button of accept hosted form within IFrame&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 14:28:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65309#M38996</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2018-12-10T14:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65321#M39008</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_1" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.developer.authorize.net/t5/user/viewprofilepage/user-id/27331" target="_self"&gt;mvkotekar1983&lt;/A&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Accept Hosted doesn't use an orderId element. In fact, Authorize.Net does not currently use orderId. If you are including this with your&amp;nbsp;getHostedPaymentPageRequest, I would expect that an error would occur.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;You can review the accepted values within a &lt;SPAN&gt;getHostedPaymentPageRequest&amp;nbsp;&lt;/SPAN&gt;at:&amp;nbsp;&lt;A href="https://developer.authorize.net/api/reference/index.html#accept-suite-get-an-accept-payment-page" target="_blank"&gt;https://developer.authorize.net/api/reference/index.html#accept-suite-get-an-accept-payment-page&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Can you elaborate on what you are attempting to accomplish so I can point you in the right direction?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Elaine&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 05:59:39 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65321#M39008</guid>
      <dc:creator>ElaineM</dc:creator>
      <dc:date>2018-12-11T05:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65326#M39013</link>
      <description>&lt;P&gt;I apologize for the confusion. The actual issue is around new orderType() where we define the invoiceNumber and Description details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue is: When we define orderType with invoiceNumber and Description, the transaction would end up in unexpected error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we remove the orderType assignment same code works for successfull payment transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the setting details&lt;/P&gt;&lt;P&gt;settingType[] settings = new settingType[5];&lt;/P&gt;&lt;P&gt;settings[0] = new settingType();&lt;BR /&gt;settings[0].settingName = settingNameEnum.hostedPaymentButtonOptions.ToString();&lt;BR /&gt;settings[0].settingValue = Serializer.SerializeToJson(new { text = "Pay" });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[1] = new settingType();&lt;BR /&gt;settings[1].settingName = settingNameEnum.hostedPaymentOrderOptions.ToString();&lt;BR /&gt;settings[1].settingValue = Serializer.SerializeToJson(new { show = false });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[2] = new settingType();&lt;BR /&gt;settings[2].settingName = settingNameEnum.hostedPaymentReturnOptions.ToString();&lt;BR /&gt;settings[2].settingValue = Serializer.SerializeToJson(new { showReceipt = false, url = returnUrl, urlText = "Continue", cancelUrl = cancelUrl, cancelUrlText = "Cancel" });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[3] = new settingType();&lt;BR /&gt;settings[3].settingName = settingNameEnum.hostedPaymentPaymentOptions.ToString();&lt;BR /&gt;settings[3].settingValue = Serializer.SerializeToJson(new { cardCodeRequired = false, showCreditCard = true, showBankAccount = false });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[4] = new settingType();&lt;BR /&gt;settings[4].settingName = settingNameEnum.hostedPaymentIFrameCommunicatorUrl.ToString();&lt;BR /&gt;settings[4].settingValue = Serializer.SerializeToJson(new { url = commUrl });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code to generate transactionRequestType&lt;/P&gt;&lt;P&gt;return new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),&lt;BR /&gt;amount = amount,&lt;BR /&gt;order = new orderType() { invoiceNumber = paymentOrderId.ToString(), description = paymentDescription }&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below code is used to set the appropriate details to generate the token&lt;/P&gt;&lt;P&gt;var paymentPageSettings = CreatePaymentPageSettings();&lt;BR /&gt;var transactionRequest = CreateTransactionRequest(paymentOrderId, paymentDescription, amount);&lt;/P&gt;&lt;P&gt;var request = new getHostedPaymentPageRequest();&lt;BR /&gt;request.transactionRequest = transactionRequest;&lt;BR /&gt;request.hostedPaymentSettings = paymentPageSettings;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 14:24:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65326#M39013</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2018-12-11T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65328#M39015</link>
      <description>Again with the disclaimer that I don’t know this language, it looks like you are declaring an instance of an object and setting property values of that object in one line. I think you would need to instantiate the ordertype object and assign it a variable, then in separate lines use method calls to set the properties.</description>
      <pubDate>Tue, 11 Dec 2018 18:38:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65328#M39015</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2018-12-11T18:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65330#M39017</link>
      <description>Nope. You’re following C# syntax. I just looked it up. On second glance I think you may need to set the argument of the transaction request to Order instead of invoice and description. Order is a property of the transaction request, or order type is rather, which it appears you are assigning to a variable called order. It’s been fun helping you along. In addition to keeping me entertained while I wait for food you’ve gotten me interested in C#. Best of luck to you.</description>
      <pubDate>Tue, 11 Dec 2018 21:34:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65330#M39017</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2018-12-11T21:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65365#M39043</link>
      <description>&lt;P&gt;Hi, Thanks for your finding. I apologize if I didn't follow your suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I am creating instance of OrderType filling InvoiceNumber and Description field&lt;/P&gt;&lt;P&gt;2. Assign it to TransactionRequestType&lt;/P&gt;&lt;P&gt;3. TransactionRequestType is assigned to the TransactionRequest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if above implementation is not appropriate. (Are you saying, we need to associate ordertype to the transactionRequest&amp;nbsp;directly?)&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2018 15:42:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65365#M39043</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2018-12-15T15:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65366#M39044</link>
      <description>&lt;P&gt;I think this line is the source of your problem-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var transactionRequest = CreateTransactionRequest(paymentOrderId, paymentDescription, amount);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what I'm not getting is why paymentOrderId and paymentDescription are in there. It looks like you are directly putting the properties of the orderType in the transaction request. Without knowing C#, I would think that you would either a) put it in there like this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var transactionRequest = CreateTransactionRequest(order, amount);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or b)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;something along the lines of-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var transactionRequestType = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),&amp;nbsp;&lt;/P&gt;&lt;P&gt;amount = amount,&lt;BR /&gt;&lt;SPAN&gt;order = new orderType() { invoiceNumber = paymentOrderId.ToString(), description = paymentDescription }&lt;/SPAN&gt;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var transactionRequest = CreateTransactionRequest(transactionRequestType);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And the above code I just typed is probably halfway nonsense syntactically, but it just seems odd compared to how the php API works the way this logic is laid out.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is like you are skipping one or more middlemen with this line-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var transactionRequest = CreateTransactionRequest(paymentOrderId, paymentDescription, amount);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;because the orderType is a property of the transactionRequestType, and the invoiceNumber and description are properties of the orderType.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So if you wanted to access the invoiceNumber in a drill down fashion it would be:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;transactionRequest-&amp;gt;transactionRequestType-&amp;gt;orderType-&amp;gt;invoiceNumber&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, your logic to me appears to go like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;transactionRequest-&amp;gt;invoiceNumber.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the API is kind of saying "you can't get there from here" in the response.&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;It would make sense that your code would run without these values, because all that is required is an amount to create a transaction request.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe this will help. I messed around with C# for a little bit the other day after reading your posts. It is quite a different animal, but more of the same in other ways.&amp;nbsp; Might not hurt to try.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 16:26:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65366#M39044</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2018-12-16T16:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65392#M39070</link>
      <description>&lt;P&gt;Thanks for your response, again, I apologize for the confusion. The code mentioned below is custom method I created to ensure I create the transaction type with all the details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;CreateTransactionRequest&lt;/STRONG&gt;(paymentOrderId, paymentDescription, amount);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is the implementation of CreateTransactionRequest&amp;nbsp;user defined function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;private static transactionRequestType CreateTransactionRequest(decimal paymentOrderId, string paymentDescription, decimal amount)&lt;BR /&gt;{&lt;BR /&gt;return new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),&lt;BR /&gt;amount = amount,&lt;BR /&gt;order = new orderType() { invoiceNumber = paymentOrderId.ToString(), description = paymentDescription }&lt;BR /&gt;};&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As you can see one of the property order am creating a new orderType with invoice# and description. Honesty, this may not be relevant to the issue that we are facing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The payment works successfully when I don't pass orderType.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The payment ends up with unexpected error when I pass orderType.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is some link or dependency that we are unable to identify. Or the way we are making transaction request has more or less settings.&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, 18 Dec 2018 15:36:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65392#M39070</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2018-12-18T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65404#M39080</link>
      <description>Consolidating my 2 posts from yesterday. No worries about any confusion. The user defined function that matched an API method threw me off. I am not sure what the issue is, but my hunch is that there is some kind of noise introduced when you attempt to pass the parameters in that function to the orderType object.&lt;BR /&gt;&lt;BR /&gt;I think it might be useful to try to do this without your custom function.&lt;BR /&gt;&lt;BR /&gt;First define the orderType the exact same way you did in your function, and assign it to a variable. Then instead of a custom function to create the transactionRequestType you would have a variable that serves the same purposeSo you would have something like&lt;BR /&gt;var order = new orderType() { invoiceNumber = paymentOrderId.ToString(), description = paymentDescription }&lt;BR /&gt;&lt;BR /&gt;var transactionRequest = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),&lt;BR /&gt;amount = amount&lt;BR /&gt;order = order&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;My food just came out. Hope this helps.</description>
      <pubDate>Wed, 19 Dec 2018 19:14:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65404#M39080</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2018-12-19T19:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65436#M39106</link>
      <description>&lt;P&gt;I started having the same problem with orderType when I recently tried to switch to using the dotnet core sdk in beta (&lt;A href="https://github.com/AuthorizeNet/dotnet-core-sdk-beta" target="_blank"&gt;https://github.com/AuthorizeNet/dotnet-core-sdk-beta&lt;/A&gt;). I had previously been using the dotnet sdk and did not experience the problem in version 1.9.6 and 1.9.7 (&lt;A href="https://github.com/AuthorizeNet/sdk-dotnet" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-dotnet&lt;/A&gt;). I’ve added an issue to the dotnet core sdk with some extra details (&lt;A href="https://github.com/AuthorizeNet/dotnet-core-sdk-beta/issues/11" target="_blank"&gt;https://github.com/AuthorizeNet/dotnet-core-sdk-beta/issues/11&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarize, the problem I have seems to be caused by the members of the orderType class. In the dotnet core sdk the class has many fields that do not exist in the dotnet sdk, such as discountAmount and purchaseOrderDateUTC. These fields are not nullable and so they get sent along with default values even if you are only setting orderType invoiceNumber or description. I can only assume this causes a problem in Authorize.Net’s system because those fields are not part of the API (&lt;A href="https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page" target="_blank"&gt;https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a blocking problem preventing us from using the dotnet core sdk. Can we get an idea of when this will be resolved? Also the sdk is still in beta, but the code repository has modifications in it from 2 years ago. Is there a reason it is still in beta, and when can we expect it will be available for use in production?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 22:41:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65436#M39106</guid>
      <dc:creator>mwrightmcci</dc:creator>
      <dc:date>2018-12-21T22:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65655#M39285</link>
      <description>&lt;P&gt;Any updae on this would be&amp;nbsp;of great help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 15:28:55 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65655#M39285</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2019-01-09T15:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65729#M39352</link>
      <description>&lt;P&gt;Finally my senior spent a week of time and got it resolved for me :( .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New version: 1.9.7 Does not work. [Added more fields to OrderType]&lt;/P&gt;&lt;P&gt;Old Version: 1.9.6 Does work.&amp;nbsp; [Existing fields were very few]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem could be rooted in the way how Authorize.net upgraded their version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Authorize.Net might have broken existing API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now, we are building our project with an older version of Authorize.Net and releasing to the client.&amp;nbsp;&lt;/P&gt;&lt;P&gt;CC:&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21382"&gt;@Anurag&lt;/a&gt;&amp;nbsp;&amp;lt;Please confirm if our investigation is correct or if we are missing something&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 16:03:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/65729#M39352</guid>
      <dc:creator>mvkotekar1983</dc:creator>
      <dc:date>2019-01-14T16:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66442#M39981</link>
      <description>&lt;P&gt;We are having the same exact issue.&amp;nbsp; We were also using v1.9.7 of the Authorize.Net nuget package and had to roll back to v1.9.6 to get around it.&amp;nbsp; If we called without setting the order with the orderType the transaction would go through.&amp;nbsp; &amp;nbsp;When we added that it fails.&amp;nbsp; The message in the Authorize.Net iframe just says an "unexpected error has occured" in red at the bottom.&amp;nbsp; We are currently switching over from SIM to Accept.&amp;nbsp; Something must have broken this in v1.9.7, hopefully a fix is coming.&amp;nbsp; &amp;nbsp;See our code snippet below.&amp;nbsp; If we didn't set the order on the transactionRequest it worked.&amp;nbsp; When we did it broke as described above and in this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//address information&lt;BR /&gt;var billAddress = new customerAddressType&lt;BR /&gt;{&lt;BR /&gt;firstName = currentBillingRecord.BillingFirstName,&lt;BR /&gt;lastName = currentBillingRecord.BillingLastName,&lt;BR /&gt;address = currentBillingRecord.BillingAddress.StreetAddress1,&lt;BR /&gt;city = currentBillingRecord.BillingAddress.City,&lt;BR /&gt;state = currentBillingRecord.BillingAddress.StateProvinceCode,&lt;BR /&gt;zip = currentBillingRecord.BillingAddress.PostalCode,&lt;BR /&gt;phoneNumber = phoneNumber&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var order = new orderType&lt;BR /&gt;{&lt;BR /&gt;invoiceNumber = orderNumber,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var transactionRequest = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authOnlyTransaction.ToString(), // authorize only&lt;BR /&gt;amount = amount,&lt;BR /&gt;billTo = billAddress,&lt;BR /&gt;order = order&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;TC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:27:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66442#M39981</guid>
      <dc:creator>Ansira2300</dc:creator>
      <dc:date>2019-02-15T17:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66681#M40194</link>
      <description>&lt;P&gt;Same issue here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am converting from SIM to Accept Hosted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Downloaded SKD November 2018 release - 1.9.7. And was receiving "Unexpected Error" message when charging credit card. I was getting the token without any issues from&amp;nbsp;getHostedPaymentPageRequest request.&amp;nbsp; But was never able to charge the credit card.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to narrow it down to orderType object, which is very important because it contains invoice number and transaction description; so, I could not afford not to pass it.&lt;/P&gt;&lt;P&gt;Thanks to this thread (specifically to &lt;A href="https://community.developer.authorize.net/t5/user/viewprofilepage/user-id/27331" target="_blank"&gt;mvkotekar1983&lt;/A&gt; user), the problem was identified to the extra properties that orderType has in 1.9.7 release, which are not supported by API.&lt;/P&gt;&lt;P&gt;I modified 1.9.7 and recompiled and&amp;nbsp;my Accept Hosted page works! I am not done with the migration. I will report back if there is anything that I needed to modify.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did, I modified orderType class implementation in 1.9.7 SDK&amp;nbsp;and commented out the extra fields. orderType class is located in Api/Contracts/V1/AnetApiSchema.generated.cs file. I commented out everything except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public string invoiceNumber;&lt;BR /&gt;public string description;&lt;BR /&gt;public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;&lt;/P&gt;&lt;P&gt;protected void RaisePropertyChanged(string propertyName) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.ComponentModel.PropertyChangedEventHandler propertyChanged =this.PropertyChanged;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((propertyChanged != null)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;I also had to modify public static void orderType(orderType argument) method in requestFactoryWithSpecified.cs file. Just comment out everything in this method.&lt;/P&gt;&lt;P&gt;I then recompiled.&amp;nbsp;And my Accept Hosted page worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2019 18:13:05 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66681#M40194</guid>
      <dc:creator>schernokov</dc:creator>
      <dc:date>2019-03-02T18:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66901#M40399</link>
      <description>&lt;P&gt;Disappointed that they put out another update that still seems to have the same issue.&amp;nbsp; Tested with version 2.0.0 published Saturday, March 2, 2019 and it still has the same issues so we have to stick with version v1.9.6 still.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 20:03:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/66901#M40399</guid>
      <dc:creator>Ansira2300</dc:creator>
      <dc:date>2019-03-12T20:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68242#M41486</link>
      <description>&lt;P&gt;How do you putout a 2.0 and a 2.01 and still have this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are we missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.9.6 still works.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 12:52:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68242#M41486</guid>
      <dc:creator>TCCPGrimes01</dc:creator>
      <dc:date>2019-07-02T12:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68256#M41499</link>
      <description>&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/31093"&gt;@TCCPGrimes01&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I was about to make a suggestion but the user a few posts above me beat me to it. You can manually remove or comment out a few lines of code in the class files. Remove the members and methods of the class that are not in the schema and your API call will work. The user above points you to the appropriate lines.</description>
      <pubDate>Wed, 03 Jul 2019 09:15:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68256#M41499</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2019-07-03T09:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68317#M41552</link>
      <description>&lt;P&gt;We are still holding on 1.9.6 because of this issue.&amp;nbsp; We could make code changes suggested and rebuild the binaries but that is not a smooth upgrade process by any means.&amp;nbsp; I was hoping the next version would fix two versions ago...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 19:59:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68317#M41552</guid>
      <dc:creator>Ansira2300</dc:creator>
      <dc:date>2019-07-08T19:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68519#M41706</link>
      <description>&lt;P&gt;I am also having the issue as everyone in this thread has experienced in both SANDBOX and PRODUCTION when using OrderType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using AuthorizeNet v2.0.1 in a C# environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; var transactionRequest = new transactionRequestType
            {
                transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),
                amount = modelData.amount * modelData.numberOfPeople,
                customer = new customerDataType() { email = modelData.emailAddress },
                billTo = new customerAddressType() { company = modelData.companyName },

                order = new orderType()
                {
                    invoiceNumber = modelData.invoiceNumer,
                    description = "THIRD PARTY TRAINING INVOICE"
                },
            };&lt;/PRE&gt;&lt;P&gt;If I comment out the OrderType object, it goes through with no error.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 21:15:18 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/68519#M41706</guid>
      <dc:creator>edealer07132017</dc:creator>
      <dc:date>2019-07-22T21:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: OrderType is causing Unexpected error during Payment withour ordertype payment working successfu</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/71844#M44281</link>
      <description>&lt;P&gt;So this issue still persist in 2.0.1 and we are perpetually stuck on 1.9.6 where iit works.&amp;nbsp; Again the fix being modify your files and build your own binaries seems like very poor version management.&amp;nbsp; It doesn't appear from Nuget that this package has been updated in a year. It was last updated March 20, 2019 for version 2.0.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a replacement to this SDK that we should be using?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;TC&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 22:09:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/OrderType-is-causing-Unexpected-error-during-Payment-withour/m-p/71844#M44281</guid>
      <dc:creator>Ansira2300</dc:creator>
      <dc:date>2020-05-06T22:09:23Z</dc:date>
    </item>
  </channel>
</rss>

