C# & Java SDK Integration
This page will guide you through the C# and Java SDK integration process. To get started, follow the steps below.
-
Import the provided.
.JAR
or SDK DLL file into your project. -
Import the necessary namespaces in your code.
import com.bitmick.marshall.models.*;
using com.bitmick.marshall.models;
-
Instantiate a VMC configuration object:
public vmc_configuration vmc_config = new vmc_configuration();
vmc_configuration vmc_config = new vmc_configuration();
-
Fill in the appropriate fields. The following code block presents a standard configuration:
public static void main(string[] args) { vmc_config.multi_vend_support = false; vmc_config.multi_session_support = false; vmc_config.price_not_final_support = true; 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;
Mandatory Fields
The customer machine information is mandatory for the VMC configuration. These are the
model
,serial
,hw_ver
, and themanuf_code
. Read more about these fields in VMC Configuration Object. -
Setup COM port.
m_vmc.link.set_serial_port(new pc_port("COM18", 115200))
m_vmc.link.set_serial_port(new pc_port("COM18", 115200))
COM Port
Make sure that you change the COM to the one your Marshall cable is connected to.
-
Configure the SDK and register to link events.
m_vmc.link.configure(vmc_config);
m_vmc.link.set_events(new vmc_link_events());
- Start the SDK and wait for the
onReady()
event:
vmc_instance .start();
m_vmc.link.start();
Using Android
On android, either you need support from your provider or use FTDI chip, which we provide
port implementation for it. (see the “android” folder in the JAVA SDK release)
Updated 4 days ago