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

Package DE_EPAGES::TPay::API::Tools

Utility functions for TPay.

@EXPORT_OK
MakeTimestamp
CalculateHash
LogTPay

Functions

CalculateHash
LogTPay
MakeTimestamp

CalculateHash

All data elements will be concatenated. The secret (fill up to 40 chars) will be appended afterwards. An sha hash calculation will be made then.

Syntax
$hash = CalculateHash($secret, @data);
Input
$secret (string)
the secret (of the current shop)
@data (???)
data to be hashed
Return
$hash (hash)
sha1 hash over data and secret

LogTPay

Logs a structure to the communication.log.

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

MakeTimestamp

Creates a time stamp of the current time.

Syntax
$timestamp = MakeTimestamp();
Return
$timestamp (string)
timestamp in the form yyyy-mm-ddThh:MM:ss,sss