Package DE_EPAGES::Klarna::API::Object::PaymentMethodKlarna
object interface for PaymentMethodKlarna.
Base |
DE_EPAGES::Order::API::Object::ContainerPaymentMethod |
Functions
calculatePaymentPrice
Returns the payment price for the given line item container. This method is used by lineItem and recalculateLineItem unless they are overloaded. The default implementation returns 0. Override this method to change the shipping price calculation of a basket or order. To calculate the payment costs without a lineitem container, e.g. for export to product portals, also overload the method DE_EPAGES::Shipping::API::Object::PaymentMethod::price.
Syntax |
my $PaymentPrice = $PaymentMethod->calculatePaymentPrice($Container); |
Input |
|
Return |
|
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 CurrencyID attribute matches the currency of the container.
Syntax |
if ($PaymentMethod->canAddToBasket($hVars)); |
Input |
|
Return |
|
featureName
Returns the feature name 'Klarna'.
Syntax |
$FeatureName = $PaymentMethodKlarna->featureName; |
Return |
|
recalculateLineItem
Recalculates lineitem. Saves default Klarna payment type if it is yet missing.
Syntax |
$Package->recalculateLineItem($LineItem); |
Input |
|
Return |
|
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 |
|
Return |
|