AndreasFagschlunger / O2Xfs

Java API for accessing CEN/XFS API, EMV Level 2 Kernel
47 stars 28 forks source link

Return Notes when Deposit more than max #44

Closed azdafirmansyah closed 6 years ago

azdafirmansyah commented 7 years ago

Hi All,

I set maximum deposit is 10 pieces. If customer put notes more than 10 (lets say 15 pieces). How I can get return of notes 5 pieces ?

Regards, Azda Firmansyah

AndreasFagschlunger commented 7 years ago

I don't know which XFS version your service provider supports, but unless its 3.20 or greater there isn't a way to limit the items for a cash in transaction. Since XFS 3.20 you can execute a SET_CASH_IN_LIMIT command after CASH_IN_START to limit the number of items or amount for the current transaction.

When your service provider doesn't support the SET_CASH_IN_LIMIT command, your only option is to execute CASH_IN_ROLLBACK and present all items to the customer. The Capabilities3.getMaxCashInItems() method returns the maximum number of items that can be accepted in a single CASH_IN command and reflects the hardware limitation of the device. Usually the devices returns excess items on it's own.

Best regards, Andreas Fagschlunger