Breeze Booth for iPad selection first example 1

Top  Previous  Next

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 Booth for iPad.
In this example the photo booth displays the ready screen and waits for the user to tap the screen to switch to display the menu 1 screen. When the menu 1 screen is displayed a payment request is sent to the card reader which displays the amount and invites the user to make a payment. When the payment is authorized a "switchToStillsAndStart" command is sent to the photo booth to start the countdown.

 
Prerequisites

 

To use the MDB Payment utility you need to be running Breeze Booth for iPad v2.3 or later and Camera Controller v1.1 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 a simple stills only photo booth event in the Breeze Booth Event Editor. Add an overlay image for menu 1 (menu1.png) with a message asking the user to pay and a cancel button. Add a touchscreen action to "closeMenu1" over the cancel button in the menu screen. Next set the menu timeout to 90 secs in the general settings tab of the Event Editor to ensure the menu doesn't timeout before the user has time to make their payment.
 

Select the "External controller" option in the Breeze Booth for iPad app settings and run the Camera Controller utility on the Windows PC. Uncheck the "Enable camera connection" in the Camera Controller utility if you are using the iPad's built-in camera.

Run the MDB Payment utility on the same PC as the Camera Controller utility. The MDB Payment utility screen should look something like this:
 

ipad_selection_first_connected

 

Step 1: Add an event to enable the card reader

 

Click on the "Settings..." button to display the settings dialog:
 

ipad_selection_first_settings

 

Check that "Selection first/Always idle mode" is selected and the "Mode:" dropdown list is set to "Breeze Booth for iPad".

Then click on the "Add action..." button to add an action:

 

add action selection first

 

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 stills ready screen and the card reader is disabled.

 

The "Pattern" trigger condition is set to a pattern that matches the photo booth state e.g. stillsReady 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: "test/portrait/.: stillsReady" which can be matched by setting the pattern to "stillsReady". More complex pattern matches can be defined by selecting "Use regular expression" and entering a regular expression such as test.*stillsReady for the pattern.

 

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:

 

ipad_selection_first_enable

 

 

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 the stillsReady screen to the to menu 1 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 menu1 and the reader state to IDLE.

 
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.

Note: the amount is in cents for USD or Euros and pence for GBP. This is because the scale factor is 1 and the decimal places is 2 in the MDB status shown in the main screen.

 

The "Add action" dialog should look something like this:

 

ipad_selection_first_request_payment

 

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 menu 1 screen and the reader state is RESULT. In the actions to perform section set the photo booth command to "menu1SwitchToStillsAndStart".

 

The "Add action" dialog should look something like this:

 

ipad_selection_first_authorized

 

Note: defining an action that is triggered by the RESULT state automatically sends a confirmation message to the reader which will display a "Thank you" screen and then switch to the IDLE state.

 

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 close the menu 1 screen and return to the stills ready screen.
Define a new action named "Payment failed" that is triggered when the photo booth is displaying the menu 1 screen, the reader state is IDLE and the transaction fails. In the actions to perform section set the photo booth command to "menu1Close".

 

The "Add action" dialog should look something like this:

 

ipad_selection_first_payment_failed

 

The settings screen should show all four actions and look something like this:

 

ipad_selection_first_settings3

 

Check it works

 

Click "OK" in the settings screen to return to the main screen. Tap the iPad photo booth screen to display menu 1 and the card reader should request a payment. 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 stills ready screen.
The main screen should look something like this:

 

ipad_selection_first_session

 

Refinements

 

The user can cancel the payment by tapping the cancel button in the menu 1 screen on the photo booth. This will close the menu screen and return to the ready screen 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 stills ready 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:

 

ipad_selection_first_user_cancel

 

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.
It could be extended to request different amounts for printed photos and for GIFs by using menu 1 for photos (as described in this example) and menu 2 for GIFs. Then add actions for menu 2 "request payment" with the GIF payment amount, "payment authorized" to send the command "switchSwitchToGifAndStart and "payment failed" to send the command "menu2Close".
 
More complex sessions which allow the user to choose from a range of different options with different prices can be created by using profiles to build a menu of options.

 

The actions used in this example can be loaded by clicking on the "Load..." button and loading the MDB_ipad_selection_first_ex1.xml settings file.