<?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: Line item x is invalid. (270) where amount is a negative value in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/67503#M40898</link>
    <description>&lt;P&gt;I know I'm late to the party here, but I agree with SampsonProjects.&amp;nbsp; Why can't we add discounts as negative value line items?&amp;nbsp; This is very poorly executed and the problem remains four years after it was brought up.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 18:30:51 GMT</pubDate>
    <dc:creator>matticus</dc:creator>
    <dc:date>2019-04-24T18:30:51Z</dc:date>
    <item>
      <title>Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51126#M26521</link>
      <description>&lt;P&gt;We are hitting the buffers on invalid line item when one line item is a negative number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;If result = True Then
                        Dim vDebit As Double = Row.Cells(1).Text
                        Dim vCredit As Double = Row.Cells(2).Text
                        Dim vInvNo As Integer = Row.Cells(8).Text
                        Dim vInvoiceDescription As String = Row.Cells(6).ToolTip
                        Dim LineAmount As Double = 0
                        If vCredit &amp;gt; 0 Then
                            Dim CreditString As String = "-" &amp;amp; CType(vCredit, Double)
                            LineAmount = CType(CreditString, String)
                        Else
                            LineAmount = vDebit
                        End If
                        vTotal += LineAmount
                        objInf.Add("x_line_item=item" &amp;amp; vItemNo, "&amp;lt;|&amp;gt;Invoice " &amp;amp; vInvNo &amp;amp; "&amp;lt;|&amp;gt;" &amp;amp; vInvoiceDescription &amp;amp; "&amp;lt;|&amp;gt;1&amp;lt;|&amp;gt;" &amp;amp; LineAmount &amp;amp; "&amp;lt;|&amp;gt;N")
                        vItemNo += 1
                    End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the line amount will be processed as -10.00 where the customer selects&lt;/P&gt;&lt;P&gt;One invoice $100.00&lt;/P&gt;&lt;P&gt;One Credit $10.00&lt;/P&gt;&lt;P&gt;One Invoice $100.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total $190.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should this be configured?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2015 23:03:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51126#M26521</guid>
      <dc:creator>gchq</dc:creator>
      <dc:date>2015-06-13T23:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51175#M26570</link>
      <description>&lt;P&gt;Seems the answer is not to have a negative amount in the values - it will still process as $190.00 if the amounts are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$100.00&lt;/P&gt;&lt;P&gt;&amp;nbsp; $10.00&lt;/P&gt;&lt;P&gt;$100.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks like the gateway actually ignores the amounts&amp;nbsp; provided the correct total is given, so by changing the code to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;If result = True Then
                        Dim vDebit As Double = Row.Cells(1).Text
                        Dim vCredit As Double = Row.Cells(2).Text
                        Dim vInvNo As Integer = Row.Cells(8).Text
                        Dim vInvoiceDescription As String = Row.Cells(6).ToolTip
                        Dim LineAmount As Double = 0
                        Dim LineBalance As Decimal = 0
                        If vCredit &amp;gt; 0 Then
                            Dim CreditString As String = "-" &amp;amp; CType(vCredit, Double)
                            LineAmount = CType(CreditString, String)
                            LineBalance = vCredit
                        Else
                            LineAmount = vDebit
                            LineBalance = vDebit
                        End If
                        vTotal += LineAmount
                        objInf.Add("x_line_item=item" &amp;amp; vItemNo, "&amp;lt;|&amp;gt;Invoice " &amp;amp; vInvNo &amp;amp; "&amp;lt;|&amp;gt;" &amp;amp; vInvoiceDescription &amp;amp; "&amp;lt;|&amp;gt;1&amp;lt;|&amp;gt;" &amp;amp; LineBalance &amp;amp; "&amp;lt;|&amp;gt;N")
                        vItemNo += 1
                    End If&lt;/PRE&gt;&lt;P&gt;It will process the line item as a positive number but the total will be correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 15:04:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51175#M26570</guid>
      <dc:creator>gchq</dc:creator>
      <dc:date>2015-06-18T15:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51181#M26574</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi &lt;SPAN class="UserName lia-user-name"&gt;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/18523" target="_self"&gt;&lt;SPAN class=""&gt;gchq&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever data you pass for the line item fields are not validated. Authorize.Net will only validate the total amount and process what is submitted as the total amount.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joy&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 19:22:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/51181#M26574</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2015-06-18T19:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/58752#M33367</link>
      <description>&lt;PRE&gt;AuthorizeInvalidError: {'line_items.1.unit_price': u'-5.00 is less than minimum value 0'}&lt;/PRE&gt;&lt;P&gt;I got This Error whenever i pass line with the negative unit price as discount .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 06:03:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/58752#M33367</guid>
      <dc:creator>mahesh_teck</dc:creator>
      <dc:date>2017-07-11T06:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/58771#M33386</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/22013"&gt;@mahesh_teck&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You got that error because a negative amount is not allowed.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 20:09:54 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/58771#M33386</guid>
      <dc:creator>Aaron</dc:creator>
      <dc:date>2017-07-11T20:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/60791#M35302</link>
      <description>&lt;P&gt;Then why the hell can't numbers be negative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is ZERO logic to restricting LineItems to Positive numbers if they aren't validated against the total&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 00:48:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/60791#M35302</guid>
      <dc:creator>SampsonProjects</dc:creator>
      <dc:date>2017-12-08T00:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/67503#M40898</link>
      <description>&lt;P&gt;I know I'm late to the party here, but I agree with SampsonProjects.&amp;nbsp; Why can't we add discounts as negative value line items?&amp;nbsp; This is very poorly executed and the problem remains four years after it was brought up.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 18:30:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/67503#M40898</guid>
      <dc:creator>matticus</dc:creator>
      <dc:date>2019-04-24T18:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Line item x is invalid. (270) where amount is a negative value</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/67544#M40929</link>
      <description>Just to be clear on the problem,&lt;BR /&gt;&lt;BR /&gt;You are speaking of line items as the line items object that accepts an array? There are numerous ways to work around this, I am quite certain.</description>
      <pubDate>Fri, 26 Apr 2019 22:30:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Line-item-x-is-invalid-270-where-amount-is-a-negative-value/m-p/67544#M40929</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2019-04-26T22:30:50Z</dc:date>
    </item>
  </channel>
</rss>

