Cashless Device - Accept a Vend Request from VMC in Always Idle
This tutorial will describe how to to use Qibixx' MDB devices to approve a Cashless Vend Request from a Vending Machine in Always Idle Mode. In always Idle Mode, the selection of the product is made on the machine prior to presenting the card to approve the vend request.
Throughout this tutorial, please consider a Qibixx Device to be either any flavour of the MDB-USB , or the MDB Pi Hat Plus
To accept a Cashless Vend Request, it is necessary to follow these steps:
- Enable Cashless Device using MDB API
C,1
- Wait for the vending machine to enable the Cashless Device. When the device is enabled, the following response will be received by the MDB Device.
c,STATUS,ENABLED
- The Enabled Status means that the Vending Machine is ready to operate. So the user can select a product, which will generate the following response on the MDB Device:
x
c,STATUS,VEND,<amount>,<product_id>
Example:
c,STATUS,VEND,1.00,2
- In this step, on regular readers, it is the time to insert the card (or scan a QR Code, etc), to get the customer ID and check if there are sufficient funds, or the ID is valid, etc. This process is done by the application which controls the MDB but does not go through MDB. If it is possible to approve the vend request, then, the following command must be sent to the MDB Device.
C,VEND,<amount>
Example:
C,VEND,1.00
- If by any reason (user cancels transaction, or the ID is invalid, or no sufficient funds, etc) the transaction is not to be approved, the following command must be sent:
C,STOP
- If the transaction is approved and the product is successfully dispensed, the following messages will be received in the MDB Device.
c,VEND,SUCCESS
c,STATUS,IDLE
c,STATUS,ENABLED
- If for some reason the product fails to dispense , the following messages will be received in the MDB Device (which means the transaction should be cancelled):
c,ERR,VEND 3
That's it, we hope to have made things clearer for you now. If there is any other tutorial you would like us to cover, or fix anything about this one, please reach out to us at contact@qiba.pt .