Use the C Library to allow communication between a POS application, terminal, and the Adyen payments platform. Register the POS app and terminal, create transactions, and review library responses to check status of request.
C library transaction flow
The transaction flow is:
- Initialize the library (
init_task) - Do this before starting the first transaction, but not for subsequent transactions.
- Register the POS (
- Register PIN Entry Devices (PEDs) (
- Start a transaction (
create_tender) - this step can be repeated as many times as required
- Exit the library (
The library represents results, states and other fixed values using enums. The adyen_enum.h file contains these enums. Helper functions are available to convert strings to enums and enums to strings.
Include POSLibC.h as this will handle your platform specifics, such as threading, data models, platform specifications and so on.
The POS App should use the enumerated values instead of the underlying values. For example, if a value of an enum should be stored to disk, store the string and not the integer value.