cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to catch Add Payment Item event in Backend SAP - CCO?

AaronMendieta
Participant
561

Hi Experts!

I have been working on integrating a Bank Terminal with CCO and I have found a method (isTransactionalPaymentRequired) to identify when a transactional payment exists in Payment-Item’s collection, however, it seems to be triggered only when the receipt is going to be posted/confirmed.

I have noticed that when multiple Card-method payments exist, they are executed sequentially (first $30, then $60, and finally $26) and that is something that we do not want to happen.

cco-payment-collection.png

Therefore, I have attempted to catch the corresponding method to the next button (which I think triggers an action that has to do with adding a Payment Item)

cco-ok-add-payment.png

however, I have not found anything that allow me to achieve this yet.

I have tried to use the next methods:

getTransactionHandlerForPayment or getTransactionHandlers

and renaming my methods the next ways:

addPaymentItem (based on addSalesItem method name) or newPaymentItem

but none of them seem to work.

So first I would like to ask you, is there any method that catch the event when a Payment Item is added?

or

Using the method isTransactionalPaymentRequired (when the receipt is posted/confirmed) is the only way to trigger anything related to Transactional payments?

Any help will be really appreciated

Best Regards!

Accepted Solutions (0)

Answers (1)

Answers (1)

Klaus_Frick
Active Participant
0 Likes

Hello pamt

You can fetch Cash and card payments events with addPayoutItems within PaymentItemPosService Class.

@PluginAt(pluginClass= PaymentItemPosService.class, method="addPayoutItems", where=POSITION.BEFORE)
@PluginAt(pluginClass = PaymentItemPosService.class, method="addPayoutItems", where=POSITION.AFTER)


Best Regards
Klaus