<?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 The type AuthorizeNet.BankAccount was not expected in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-type-AuthorizeNet-BankAccount-was-not-expected/m-p/66182#M39753</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the C# example payment example and converted it to VB.Net, but I'm having trouble processing bank account. When I execute my transactionController I'm getting an error&lt;/P&gt;&lt;P&gt;"&lt;I&gt;The type AuthorizeNet.BankAccount was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked around online and most of the solutions say I have to add XmlInclude attribute to the base class. This doesn't work because I'm using an API and I don't have access to the source code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also found this post&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Having-trouble-with-XSD-s-and-1-9-6/td-p/64781" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Having-trouble-with-XSD-s-and-1-9-6/td-p/64781&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that says this can happen because nameOnAccount is null but my nameOnAccount field is not null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            Dim bankAccount As BankAccount = New BankAccount()
            bankAccount.routingNumber = "123123123"
            bankAccount.accountNumber = "1234567890"
            bankAccount.accountType = bankAccountTypeEnum.checking
            bankAccount.bankName = "fake bank"
            bankAccount.nameOnAccount = "fake name"
            bankAccount.echeckType = EcheckType.WEB

            Dim paymentType As paymentType = New paymentType() _
                With {.Item = bankAccount}


            Dim lineItems(2) As lineItemType
            lineItems(0) = New lineItemType() _
                With {.itemId = "1", .name = "t-shirt", .quantity = 2, .unitPrice = New Decimal(1.0)}
            lineItems(1) = New lineItemType() _
                With {.itemId = "2", .name = "snowboard", .quantity = 1, .unitPrice = New Decimal(1.0)}


            Dim tax As extendedAmountType = New extendedAmountType() _
                With {.amount = "123",
                      .description = "total taxed amount",
                      .name = "tax"}


            Dim transactionRequest As transactionRequestType = New transactionRequestType() _
                With {.transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),
                      .amount = New Decimal(480.0),
                      .billTo = billingAddress,
                      .payment = paymentType,
                      .lineItems = lineItems,
                      .transactionSettings = settings,
                      .customer = customer,
                      .tax = tax}

            Dim request As createTransactionRequest = New createTransactionRequest() _
                With {.transactionRequest = transactionRequest}
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
            Dim controller As createTransactionController = New createTransactionController(request)
            controller.Execute()&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Jan 2019 18:42:56 GMT</pubDate>
    <dc:creator>gzhou910917</dc:creator>
    <dc:date>2019-01-30T18:42:56Z</dc:date>
    <item>
      <title>The type AuthorizeNet.BankAccount was not expected</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-type-AuthorizeNet-BankAccount-was-not-expected/m-p/66182#M39753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the C# example payment example and converted it to VB.Net, but I'm having trouble processing bank account. When I execute my transactionController I'm getting an error&lt;/P&gt;&lt;P&gt;"&lt;I&gt;The type AuthorizeNet.BankAccount was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked around online and most of the solutions say I have to add XmlInclude attribute to the base class. This doesn't work because I'm using an API and I don't have access to the source code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also found this post&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Having-trouble-with-XSD-s-and-1-9-6/td-p/64781" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Having-trouble-with-XSD-s-and-1-9-6/td-p/64781&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that says this can happen because nameOnAccount is null but my nameOnAccount field is not null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            Dim bankAccount As BankAccount = New BankAccount()
            bankAccount.routingNumber = "123123123"
            bankAccount.accountNumber = "1234567890"
            bankAccount.accountType = bankAccountTypeEnum.checking
            bankAccount.bankName = "fake bank"
            bankAccount.nameOnAccount = "fake name"
            bankAccount.echeckType = EcheckType.WEB

            Dim paymentType As paymentType = New paymentType() _
                With {.Item = bankAccount}


            Dim lineItems(2) As lineItemType
            lineItems(0) = New lineItemType() _
                With {.itemId = "1", .name = "t-shirt", .quantity = 2, .unitPrice = New Decimal(1.0)}
            lineItems(1) = New lineItemType() _
                With {.itemId = "2", .name = "snowboard", .quantity = 1, .unitPrice = New Decimal(1.0)}


            Dim tax As extendedAmountType = New extendedAmountType() _
                With {.amount = "123",
                      .description = "total taxed amount",
                      .name = "tax"}


            Dim transactionRequest As transactionRequestType = New transactionRequestType() _
                With {.transactionType = transactionTypeEnum.authCaptureTransaction.ToString(),
                      .amount = New Decimal(480.0),
                      .billTo = billingAddress,
                      .payment = paymentType,
                      .lineItems = lineItems,
                      .transactionSettings = settings,
                      .customer = customer,
                      .tax = tax}

            Dim request As createTransactionRequest = New createTransactionRequest() _
                With {.transactionRequest = transactionRequest}
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
            Dim controller As createTransactionController = New createTransactionController(request)
            controller.Execute()&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jan 2019 18:42:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/The-type-AuthorizeNet-BankAccount-was-not-expected/m-p/66182#M39753</guid>
      <dc:creator>gzhou910917</dc:creator>
      <dc:date>2019-01-30T18:42:56Z</dc:date>
    </item>
  </channel>
</rss>

