ePages 6.17.48 - DE_EPAGES/Klarna/API/TLE/KlarnaTLEHandler.pm

Package DE_EPAGES::Klarna::API::TLE::KlarnaTLEHandler

TLE functions for Klarna

Functions

KLARNA_CONDITIONSREGION
KLARNA_COUNTRYDISPLAYNAME
KLARNA_INVOICEFEE
KLARNA_INVOICEURL
KLARNA_ISACTIVATED
KLARNA_ISCURRENCYACTIVE
KLARNA_LANGUAGECODE
KLARNA_ORDERURL
KLARNA_RESERVATIONURL

KLARNA_CONDITIONSREGION

Returns the country code which is used to display the Klarna conditions in the SF template. The code is returned in lower case.

Syntax
#KLARNA_CONDITIONSREGION(#Basket)
Example
#LOCAL("ConditionsRegion", #KLARNA_CONDITIONSREGION(#Basket))
  #ConditionsRegion
#ENDLOCAL
Input
$Processor (object)
TLE processor
$aParams (array)
#Basket
Return
#ConditionsRegion (char(2))
language code

KLARNA_COUNTRYDISPLAYNAME

Returns a string to display as a country name, containing the native and the english name of the country

Syntax
#KLARNA_COUNTRYDISPLAYNAME(#CountryID)
Example
#LOCAL("CountryName", #KLARNA_COUNTRYDISPLAYNAME(#CountryID))
  #CountryName
#ENDLOCAL
Input
$Processor (object)
TLE processor
$aParams (array)
#CountryID
Return
#CountryDisplayName (string)
country name to display

KLARNA_INVOICEFEE

Function returns the invoice fee as gross or net price depending on the tax model. Decimal points are replaced by commas.

Syntax
#KLARNA_INVOICEFEE(#PaymentMethod.Object, #LineItemContainer.Object)
Input
$Processor (object)
TLE processor
$aParams (array)
#PaymentMethod, #LineItemContainer
Return
#InvoiceFee (string)
invoice fee in correct tax model, decimal points replaced by commas

KLARNA_INVOICEURL

Returns an URL to an invoice on Klarna's servers

Syntax
#KLARNA_INVOICEURL(#IsInTestMode, #LineItemContainer.Payment.Kr_InvoiceNo)
Input
$Processor (object)
TLE processor
$aParams (array)
#IsInTestMode, #LineItemContainer.Payment.Kr_InvoiceNo
Return
#URL (string)
Invoice URL

KLARNA_ISACTIVATED

If there is a Klarna payment method it will return the isActivated Status

Syntax
#KLARNA_ISACTIVATED( #Shop.ID )
Input
$Processor (object)
TLE processor
$aParams (array)
#ShopID
Return
$IsActivated (integer)
is the klarna payment activated

KLARNA_ISCURRENCYACTIVE

Returns true if the given currency is activated in the shop

Syntax
#KLARNA_ISCURRENCYACTIVE(#Shop.Object, #CurrencyID)
Example
#SET("CurrencyActive", #KLARNA_ISCURRENCYACTIVE(#Shop.Object, #CurrencyID))
Input
$Processor (object)
TLE processor
$aParams (array)
#Shop.Object, #CurrencyID
Return
#Active (boolean)
true if currency is activated

KLARNA_LANGUAGECODE

Function returns language code by numerical language code, used in SF template.

Syntax
#KLARNA_LANGUAGECODE(#LanguageID)
Example
#LOCAL("LanguageCode", #KLARNA_LANGUAGECODE(#LanguageID))
  #LanguageCode
#ENDLOCAL
Input
$Processor (object)
TLE processor
$aParams (array)
#LanguageID
Return
#LanguageCode (char(2))
language code

KLARNA_ORDERURL

Returns an URL to the order the LineItemContainer belongs to

Syntax
#KLARNA_ORDERURL(#LineItemContainer)
Input
$Processor (object)
TLE processor
$aParams (array)
#Shop.Object, #LineItemContainer.Payment.Kr_InvoiceNo
Return
#URL (string)
Order URL

KLARNA_RESERVATIONURL

Returns an URL to an Reservation Klarna's servers

Syntax
#KLARNA_RESERVATIONURL(#IsInTestMode, #LineItemContainer.Payment.ReservationNumber)
Input
$Processor (object)
TLE processor
$aParams (array)
#IsInTestMode, #LineItemContainer.Payment.ReservationNumber
Return
#URL (string)
Reservation URL