Package DE_EPAGES::POSTPAY::API::Tools
provide some tool functions
Base |
- |
@EXPORT_OK |
Functions
- CheckMandatoryFields
- ConvertUndefValuesToDefaultValue
- GetAllPOSTPAYShops
- GetDisplayName
- GetPOSTPAYPaymentMethod
- GetPOSTPAYTax
- GetUrl
- GetValidOrderUnits
- KeyValuesToString
- POSTPAYLog
- ParseKeyValues
- _MaskPOSTPAYPassword
- roundMoney
CheckMandatoryFields
checks if hash values are not empty and defined every xml tag should have a value
Syntax |
CheckMandatoryFields($Shop,$Basket,$hRequestParameters); |
Input |
|
ConvertUndefValuesToDefaultValue
converts undef values in a hash to a default value
Syntax |
ConvertUndefValuesToDefaultValue($hHash, $DefaultValue); |
Input |
|
GetAllPOSTPAYShops
Returns all shops with valid POSTPAY account.
Syntax |
$aShops = GetAllPOSTPAYShops(); |
Return |
|
GetDisplayName
Calculates DisplayName from FirstName and LastName
Syntax |
GetDisplayName( $FirstName, $LastName ); |
Input |
|
Return |
|
GetPOSTPAYPaymentMethod
returns the postpaypaymentmethod
Syntax |
$POSTPAYPayment = GetPOSTPAYPaymentMethod($Shop); |
Input |
|
Return |
|
GetPOSTPAYTax
gets tax string for postpay, if tax doesnt match a tax string from postpay write stantard in taxfield because its just for statistic reasons
Syntax |
GetPOSTPAYTax($LineItemProduct); |
Input |
|
Return |
|
GetUrl
returns POSTPAY url
Syntax |
my $url= GetUrl($PaymentMethod); |
Input |
|
Return |
|
GetValidOrderUnits
returns all units which are valid for POSTPAY
Syntax |
$hValidUnits = GetValidOrderUnits(); |
Return |
|
KeyValuesToString
Converts a hash with key value pairs into a string, which is formatted using the constants DELIMITER and JOIN_SIGN.
Syntax |
KeyValuesToString($hKeyValues); |
Input |
|
Return |
|
POSTPAYLog
Logs a structure to the communication.log.
Syntax |
POSTPAYLog($Name, $Debug, $Section); |
Example |
POSTPAYLog('SendRequestHash', \%Hash, 'Send'); |
Input |
|
ParseKeyValues
Parses string with multiple key value pairs, which are formatted using the constants DELIMITER and JOIN_SIGN. The parsed key value pairs are put into a hash.
Syntax |
ParseKeyValues($String); |
Input |
|
Return |
|
_MaskPOSTPAYPassword
remove password from xml for logging
Syntax |
_MaskPOSTPAYPassword($LogXML); |
Input |
|
Return |
|
roundMoney
round a value to 2 digits after comma
Syntax |
roundMoney($Price); |
Input |
|
Return |
|