ePages 6.10 - DE_EPAGES/Klarna/API/Object/PaymentMethodKlarna.pm

Package DE_EPAGES::Klarna::API::Object::PaymentMethodKlarna

object interface for PaymentMethodKlarna.

Base
DE_EPAGES::Order::API::Object::ContainerPaymentMethod

Functions

canAddToBasket
featureName
recalculateLineItem
usableAtStorefront

canAddToBasket

Tests if a payment method can be added to the basket with the given currency. Overrides function DE_EPAGES::Order::API::Object::ContainerPaymentMethod::canAddToBasket The payment method can be added to the container if the Kr_Currency attribute matches the currency of the container.

Syntax
if ($PaymentMethod->canAddToBasket($hVars));
Input
$hVars (ref.hash)
  • CurrencyID - alpha currency code (ISO 4217) - char(3)
  • TaxModel - gross or net price - int
Return
$canAddToBasket (boolean)
true if payment method can be used for the given currency

featureName

Returns the feature name 'Klarna'.

Syntax
$FeatureName = $PaymentMethodKlarna->featureName;
Return
$FeatureName (String)
feature name (undef means no feature count)

recalculateLineItem

Recalculates lineitem. Saves default Klarna payment type if it is yet missing.

Syntax
 $Package->recalculateLineItem($LineItem);
Input
$LineItem (object)
line item
Return
$object (object)
created object

usableAtStorefront

Funtion tests if a payment method is visible in the storefront. Uses function DE_EPAGES::Payment::API::Object::PaymentMethod::price to evaluate if payment methode has a price (price can be 0).

Syntax
$Usable = $PaymentMethod->usableAtStorefront($hVars);
Input
$hVars (ref.hash)
CurrencyID - alpha currency code (ISO 4217) - char(3),
TaxModel - gross or net price - int
Return
$Usable (boolean)
true if payment method is usable in the storefront