This example shows how to set up the MDB Payment utility to start a photo booth with a credit card reader in selection first/always idle mode. The photo booth app in this example is Breeze RemotePro.
In this example the photo booth displays a welcome screen and waits for the user to tap the screen to switch to the ready screen. When the ready screen is displayed a payment request is sent to the card reader which displays the amount and invites the user to make a payment.
Prerequisites
To use the MDB Payment utility you need to be running Breeze RemotePro v3.16 or later.
First check that the credit card reader is running in MDB level 3 for selection first/always idle mode. If the Nayax VPOS Touch is not set to MDB level 3 you may need to contact Nayax support to request them to set it to MDB level 3.
Create an Event
Create a simple photo booth event in Breeze RemotePro and select the “Auto standby” option so that the photo booth returns to standby mode after each session. Edit the welcome.jpg screen to display a message showing the price of the session and inviting the user to tap the screen to start. Add a touchscreen action to “Switch from standby to ready” to the standby screen. Next edit the ready.jpg screen to display a message saying “Please pay now” and add a button to allow the user to cancel the payment. Add a touchscreen action to “Switch from ready to standby” using the touchscreen editor and place it over the cancel button in the ready screen.
In Breeze RemotePro’s “Photobooth Settings” dialog set “Start options” to “Touchscreen” so that it can accept commands from the MDB Payment Utility.
Run Breeze RemotePro in photo booth mode and run the MDB Payment utility. The MDB Payment utility screen should look something like this:
Step 1: Add an event to enable the card reader
Click on the “Settings…” button to display the settings dialog:
Check that “Selection first/Always idle mode” is selected and the “Mode:” dropdown list is set to “DSLR Remote Pro”.
Then click on the “Add action…” button to add an action:
Give the action a suitable name e.g. “Enable reader” and then set the trigger conditions in the section below. What we want to do is enable the card reader when the photo booth is displaying the welcome.jpg screen and the card reader is disabled.
Pattern Trigger
The “Pattern” trigger condition is set to a pattern that matches the photo booth screen e.g. welcome.jpg. If “Use regular expression” is not selected the pattern string will match any part of the photo booth screen path. In the screenshot above the screen path is shown as: C:\Users\chris\Documents\PhotoboothImages\copies2\welcome.jpg
which can be matched by setting the pattern to welcome.jpg
. More complex pattern matches can be defined by selecting “Use regular expression” and entering a regular expression such as .*welcome\.jpg
for the pattern.
Add the INIT Action
We only want to enable the card reader if it is disabled (i.e. the state is INIT) and so we set the reader state in the trigger conditions to INIT.
Next we need to specify the action to take when the trigger conditions are met. In this case all we need to do is enable the card reader.
The “Add action” dialog should look something like this:
Save the Action
Click OK to save the action and the settings dialog should look something like this:
Click OK and the action should be triggered if the photo booth is displaying the welcome.jpg screen and the reader is disabled. The status log should show the action triggering, the reader’s screen change to the select product animation and the state should change to IDLE:
Step 2: Request a payment when the user taps the photo booth to start the session
When the user taps the photo booth screen it will switch from standby to ready and will display the ready.jpg screen. When this happens we want to request payment before starting the countdown. To do this click on “Add action…” in the settings dialog and name the action “Request payment”. In the trigger conditions section set the pattern to ready.jpg and the reader state to IDLE.
Add the IDLE Action
In the actions to perform section set the “Request payment, amount:” to the amount, e.g. for $1 set this to 100, and set the required product number. The product number can be set to anything and is recorded in the logs that can be accessed via the Nayax web dashboard. This can be useful if you have different options at different prices and want to keep a record of which is selected.
The “Add action” dialog should look something like this:
When the payment has been requested the status changes to VEND. If the payment is authorized the status will change to RESULT but if it fails it will change to IDLE with the status TransactionFailed.
Step 3: Payment Authorized
Define a new action named “Payment authorized” that is triggered when the photo booth is displaying the ready.jpg screen and the reader state is RESULT. In the actions to perform section set the photo booth command to “Start photobooth”.
Add the RESULT Action
The “Add action” dialog should look something like this:
Step 4: Payment Failed
If the payment is not authorized, times out or is cancelled by the user the state changes to IDLE with the status TransactionFailed. When this happens we want to switch to standby mode to display the welcome.jpg screen.
Add the IDLE Action
Define a new action named “Payment failed” that is triggered when the photo booth is displaying the ready.jpg screen, the reader state is IDLE and the transaction fails. In the actions to perform section set the photo booth command to “Switch from ready to standby”.
The “Add action” dialog should look something like this:
The settings screen should show all four actions and look something like this:
Check it works
Click “OK” in the settings screen to return to the main screen. Tap the screen on the photo booth to switch from standby to ready and the card reader should show the payment screen. Then scan a credit card (or the Nayax technician mode card) to start a payment. The photo booth should wait for the payment to be authorized and then start the countdown. At the end of the session it should return to the welcome.jpg screen.
The main screen should look something like this:
Refinements
The user can cancel the payment by tapping the cancel button in the ready screen on the photo booth. This will switch the photo booth to standby mode ready for the next user but the card reader will still be showing the payment screen. To cancel the payment on the card reader we need to add an action that is triggered when the welcome.jpg screen is displayed and the card reader is in the VEND state. This action should send a cancel command to the card reader. The action would look something like this:
The example described on this page is a very simple single payment photo booth which requests a payment when the photo booth screen is tapped and starts the countdown after the payment has been authorized. More complicated sessions which allow the user to choose different options with different prices can be created by using profiles to build a menu of options.
Loading Example Actions
The actions used in this example can be loaded by clicking on the “Load…” button and loading the MDB_selection_first_ex1.xml settings file.