NAME
Lib::Pepper::Constants - Constants and enumerations for Lib::Pepper
SYNOPSIS
use Lib::Pepper::Constants qw(:all);
# Or import specific groups
use Lib::Pepper::Constants qw(:operations :currencies :errors);
# Use the constants
my $operation = PEP_OPERATION_TRANSACTION;
my $currency = PEP_CURRENCY_EUR;
if($result == PEP_FUNCTION_RESULT_SUCCESS) {
print "Operation successful\n";
}
DESCRIPTION
This module provides all constants and enumerations from the Pepper library, including operations, states, transaction types, currencies, error codes, and more. Constants are organized into export tags for convenience.
EXPORT TAGS
- :all
-
All constants
- :operations
-
Operation type constants (OPEN, CLOSE, TRANSACTION, etc.)
- :states
-
State machine state constants
- :transactions
-
Transaction type constants (GOODS_PAYMENT, CREDIT, etc.)
- :callbacks
-
Callback event and option constants
- :tickets
-
Ticket type constants
- :utilities
-
Utility code constants
- :auxiliary
-
Auxiliary code constants
- :currencies
-
Currency code constants (ISO 4217)
- :communication
-
Communication parameter constants (baud rate, parity, etc.)
- :payment
-
Payment mode constants
- :protocol
-
Protocol version constants
- :errors
-
Error code constants (PEPFunctionResult values)
- :results
-
Transaction result constants
- :special
-
Special values (INVALID_HANDLE, TRUE, FALSE)
- :language
-
Language code constants for ZVT
- :terminals
-
Terminal type constants
KEY CONSTANTS
Operations
PEP_OPERATION_OPEN
PEP_OPERATION_CLOSE
PEP_OPERATION_TRANSACTION
PEP_OPERATION_SETTLEMENT
PEP_OPERATION_RECOVERY
PEP_OPERATION_UTILITY
PEP_OPERATION_AUXILIARY
PEP_OPERATION_DOWNLOAD_LICENSE
Transaction Types
PEP_TRANSACTION_TYPE_GOODS_PAYMENT (11)
PEP_TRANSACTION_TYPE_VOID_GOODS_PAYMENT (12)
PEP_TRANSACTION_TYPE_CREDIT (41)
PEP_TRANSACTION_TYPE_RESERVATION (51)
Currencies
PEP_CURRENCY_EUR (978)
PEP_CURRENCY_USD (840)
PEP_CURRENCY_GBP (826)
PEP_CURRENCY_CHF (756)
PEP_CURRENCY_CHW (948)
Error Codes
PEP_FUNCTION_RESULT_SUCCESS (0)
PEP_FUNCTION_RESULT_FAILURE_GENERIC (-1)
PEP_FUNCTION_RESULT_FAILURE_LIBRARY_NOT_INITIALIZED (-103)
PEP_FUNCTION_RESULT_FAILURE_COMMUNICATION_TIMEOUT (-1503)
Terminal Types
PEP_TERMINAL_TYPE_GENERIC_ZVT (118) - Generic ZVT protocol
PEP_TERMINAL_TYPE_HOBEX_ZVT (120) - Hobex ZVT protocol
PEP_TERMINAL_TYPE_GLOBALPAYMENTS_ZVT (129) - Global Payments ZVT protocol
PEP_TERMINAL_TYPE_MOCK (999) - Mock implementation for testing
WARNING: AI USE
Warning, this file was generated with the help of the 'Claude' AI (an LLM/large language model by the USA company Anthropic PBC) in November 2025. It was not reviewed line-by-line by a human, only on a functional level. It is therefore not up to the usual code quality and review standards. Different copyright laws may also apply, since the program was not created by humans but mostly by a machine, therefore the laws requiring a human creative process may or may not apply. Laws regarding AI use are changing rapidly. Before using the code provided in this file for any of your projects, make sure to check the current version of your local laws.
AUTHOR
Rene Schickbauer, <cavac@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2025 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.42.0 or, at your option, any later version of Perl 5 you may have available.