Skip to main content

In-Person Payments

CommerceConstants.hpp

Last updated: 16-Jul-2024

namespace verifone_sdk

struct CommerceConstants

Public Static Attributes

static std::string const MODE_DEVICE

  • The default mode. Use when communicating with an actual device.

static std::string const MODE_STUB

  • Uses pre-built responses without connecting to an actual device. This allows automated tests and simplified flows.

static std::string const MODE_EMULATOR

  • Use when communicating with a terminal emulator.

static constexpr int32_t STATUS_CANCELED

  • The status code when an action has been canceled, generally by sending an abort command, or in the case of user input, canceling the input screen.

static constexpr int32_t STATUS_CONNECTION_FAILED

  • Sent when the connection to the device has been lost and cannot be restored.

static std::string const CP_APP_ID_META_DATA_NAME

  • To be used in the Application Manifest to hold the CP App Id, so that messages can be communicated between the terminal and this app. Example: TODO(JevgenijsZ1): Figure out whether we want to change below string to contain payment_sdk instead of commerce

static constexpr int32_t MODE_STUBS_DEBUG

  • Puts the service in a debug mode that returns fixed responses without communicating with the terminal when used with TransactionManager#setDebugMode(int).

static constexpr int32_t MODE_SIMULATOR

  • Tells the service to communicate with a terminal simulator that returns fixed responses when used with TransactionManager#setDebugMode(int).

static constexpr int32_t INSUFFICIENT_PERMISSIONS

  • The proper constant to communicate with a physical terminal when used with TransactionManager#setDebugMode(int). const MODE_DEVICE: i32 = 3;

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo