ePages 6.10 - DE_EPAGES/HSBC/API/Tools.pm

Package DE_EPAGES::HSBC::API::Tools

utility functions

@EXPORT_OK
CreateOrderHash
LogHSBC
replaceSpecialCharacters

Functions

CreateOrderHash
LogHSBC

CreateOrderHash

creates the OrderHash from the given Input-Arguments and the CPI Secret

Syntax
$OrderHash = CreateOrderHash( {'OrderId' => '123456', 'CpiDirectResultUrl' => '...'}
                              'dP/7KdtiuALL8ofLqCjlKDK7NBNfbmCa' );
Input
$Hash
Contains all HSBC CPI Payment Arguments
$CPIHashKey
CPI Secret
$Shop (CPI-OrderHash (Check Sum of all Arguments))
Shop (optional, needed for debugging) | Object
§ret $OrderHash

LogHSBC

Logs a structure to the communication.log.

Syntax
LogHSBC($Name, $Debug, $Section);
Example
LogHSBC('SendRequestHash', \%Hash, 'Send');
Input
$Name (string)
name of data
$Debug (hash)
data to be logged
$Section (string)
name of the section to be logged