I can create Cash and Check payments however I can't get a credit card transaction through.
I am getting this error message:
code: -5002
message: Credit Total does not match payments total [OCRP]
Thanks for your help,
Craig
Set m_oPayment = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
'Assign Payment Header Information
m_oPayment.ApplyVAT = tNO
m_oPayment.CardCode = RollUpRec!CUSTID ' B1 CardCode
m_oPayment.DocCurrency = "USD"
m_oPayment.DocDate = CDate(RollUpRec!RECMODDATE) 'Transaction Date
m_oPayment.DocTypte = rCustomer 'SAPbobsCOM.BoRcptTypes.rCustomer
m_oPayment.HandWritten = tNO ' SAPbobsCOM.BoYesNoEnum.tNO
m_oPayment.JournalRemarks = "Incoming Payment"
m_oPayment.LocalCurrency = tYES 'SAPbobsCOM.BoYesNoEnum.tYES
'Payment body
Call m_oPayment.CreditCards.Add
m_oPayment.CreditCards.AdditionalPaymentSum = CDbl(0)
m_oPayment.CreditCards.CardValidUntil = CDate("10/04/2004")
'm_oPayment.CreditCards.CreditAcct = "295000"
m_oPayment.CreditCards.CreditCard = 1
m_oPayment.CreditCards.CreditCardNumber = "884848448"
'm_oPayment.CreditCards.CreditCur = "USD"
m_oPayment.CreditCards.CreditSum = CDbl(RollUpRec!PAIDAMOUNT)
m_oPayment.CreditCards.CreditType = 1
m_oPayment.CreditCards.FirstPaymentSum = CDbl(RollUpRec!PAIDAMOUNT)
m_oPayment.CreditCards.NumOfCreditPayments = 1
m_oPayment.CreditCards.NumOfPayments = 1
m_oPayment.CreditCards.OwnerIdNum = "3993939"
m_oPayment.CreditCards.OwnerPhone = "383838888"
m_oPayment.CreditCards.PaymentMethodCode = 1
m_oPayment.CreditCards.VoucherNum = "1234"
I don't know if this is the cause of your problem, but the one step that looks incorrect to me is adding the credit card line before filling it in. You get one line for free that you should fill in without any adds. You need to add additional lines before filling them in. The example in the help file shows this (at least in 6.5).
Add a comment