SDK Flags

The vmc_configuration object allows you to set various configuration flags. When using the Marshall SDK, these determine the behavior and capabilities of the peripheral (originally intended for vending machine controller -VMC).

Configuration Flags

You can initiate these flags in the main method, as in the following code:

public static void main(string[] args) {
    vmc_config.multi_vend_support = false;
    vmc_config.multi_session_support = false;
    vmc_config.price_not_final_support = false;
    vmc_config.reader_always_on = false;
    vmc_config.always_idle = false;
    vmc_config.vend_denied_policy = vmc_configuration.vend_denied_policy_cancel;

    vmc_config.mifare_approved_by_vmc_support = false;
    vmc_config.mag_card_approved_by_vmc_support = false;

    vmc_config.dump_packets_level = vmc_configuration.debug_level_dump_moderate;
    vmc_config.debug = true;
}
public class vend_machine
    vmc_config.multi_session_support = false;
    vmc_config.multi_vend_support = false;
    vmc_config.price_not_final_support = false;
    vmc_config.reader_always_on = false;
    vmc_config.always_idle = false;
    vmc_config.vend_denied_policy = vmc_configuration.vend_denied_policy_cancel;

    vmc_config.mag_card_approved_by_vmc_support = false;
    vmc_config.mifare_approved_by_vmc_support = false;

    vmc_config.debug = true;
    vmc_config.dump_packets_level = vmc_configuration.debug_level_dump_moderate;
vmc_config_t vmc_config;
  vmc_config.multi_session_support = __false;
  vmc_config.multi_vend_support = __false;
  vmc_config.price_not_final_support = __false;
  vmc_config.reader_always_on = __false;
  vmc_config.always_idle = __false;
  vmc_config.vend_denied_policy = vend_denied_policy_cancel_e;
  vmc_config.mag_card_approved_by_vmc_support = __false;
  vmc_config.mifare_approved_by_vmc_support = __false;
  vmc_config.qr_approved_by_vmc_support = __false;
  vmc_config.debug = __true;
  vmc_config.dump_packets_level = debug_level_dump_moderate;

Flag Descriptions

The table below provides a more detailed description of the flags.

Parameter

Type

Description

multi_vend_support

boolean

Enabling the sale and differentiation of multiple products in a single transaction.

multi_session_support

boolean

Enables the device to handle multiple sessions simultaneously, which is useful for scenarios where various transactions may be open at the same time.

price_not_final_support

boolean

Relevant for multi-session (pre-selection) flow only. Indicates that the authorization price received from the server is not final, meaning using it alongside Multi-session would have it behave similarly to a pre-authorization process, ensuring the balance isn't captured for a few days. You can read more on that in the Multi-Session for more details.

reader_always_on

boolean

It keeps the device's reader always turned on and ready to start transactions from the device's end instead of the peripheral. When used, a trigger for the product selection would be a card presentation or touching a button on the device instead of selecting a product on the peripheral's end.

always_idle

boolean

The transaction starts with the consumer selecting a product on the peripheral. The peripheral can send the "Vend request" command without waiting for a "Begin Session" trigger.

mifare_approved_by_vmc_support

boolean

Allows Mifare (prepaid) cards authorized by a third-party server. The card's data is being forwarded to the peripheral and it is up for it to approve/decline the card.

mag_card_approved_by_vmc_support

boolean

Allows magnetic stripe credit cards authorized by a third-party server. The card's data is being forwarded to the peripheral and it is up for it to approve/decline the card.

debug

boolean

Enables or disables log generation.

dump_packets_level

vmc_configuration

Determines the level of detail required to log messages generated by the SDK. You can read more on that in the Log generation for more details.