Skip to Content
0
Former Member
Feb 23, 2004 at 06:49 PM

DI: Create a Credit Card Payment

489 Views

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"