AndreasFagschlunger / O2Xfs

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

Step in Replenish #46

Closed azdafirmansyah closed 6 years ago

azdafirmansyah commented 7 years ago

Hi All,

Anyone give me some clue how to do replenish in CIM Module using START_EXCHANGE .......// END_EXCHANGE

Regards, Azda Firmansyah

AndreasFagschlunger commented 7 years ago

Hello @azdafirmansyah!

You start by executing a START_EXCHANGE command. This puts the CIM in an exchange state, a state in which cash units can be emptied, replensished, removed or rejected. When you're finished, execute END_EXCHANGE with CashInfo3 object as input parameter. The parameter must contain the complete list of cash unit structures not just the ones that have changed.

Best regards, Andreas Fagschlunger

azdafirmansyah commented 7 years ago

Hi @AndreasFagschlunger,

After execute START_EXCHANGE, I still failed to get cash_unit_info How to set cash_unit_info and get cash_unit_info or related info regarding replenish Can you give some snippet code t ?

Regards, Azda Firmansyah

AndreasFagschlunger commented 7 years ago

Hello @azdafirmansyah

As you can see (eadc621) I added some Builder classes to create CashInfo3 object, take a look at CashInfo3Test.testBuild(). Be careful, XFS 3.10 version is not tested yet. So the input for END_EXCHANGE is a CashInfo3 object. It must contain the complete list of cash units. Try create a CashInfo3 object similar to the result of CashUnitInfoCommand. I've never tried a Start-/End-Exchange yet.

Best regards, Andreas Fagschlunger