Seems the answer is not to have a negative amount in the values - it will still process as $190.00 if the amounts are
$100.00
$10.00
$100.00
Looks like the gateway actually ignores the amounts provided the correct total is given, so by changing the code to
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 > 0 Then Dim CreditString As String = "-" & CType(vCredit, Double) LineAmount = CType(CreditString, String) LineBalance = vCredit Else LineAmount = vDebit LineBalance = vDebit End If vTotal += LineAmount objInf.Add("x_line_item=item" & vItemNo, "<|>Invoice " & vInvNo & "<|>" & vInvoiceDescription & "<|>1<|>" & LineBalance & "<|>N") vItemNo += 1 End If
It will process the line item as a positive number but the total will be correct
06-18-2015 08:04 AM