Package DE_EPAGES::Order::API::Object::ContainerPaymentMethod
object interface for PaymentMethod to handle features hire purchase and payment discounts.
Base |
DE_EPAGES::Payment::API::Object::PaymentMethod |
Functions
addToContainer
Adds payment and tax line item to container.
Syntax |
$LineItem = $PaymentMethod->addToContainer($Container); |
Input |
|
Return |
|
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 = $ShippingMethod->calculatePaymentPrice($Container); |
Input |
|
Return |
|
canAddToBasket
Tests if a payment method can be added to the basket with the given currency. Uses function DE_EPAGES::Payment::API::Object::PaymentMethod::price to evaluate if payment methode has a price (price can be 0). Possible for methods, which costs, but have no price in the given currency.
Syntax |
$PaymentMethod->canAddToBasket($hVars); |
Input |
|
Return |
|
lineItem
Collect information for line item.
Syntax |
my $hInfo = $PaymentMethod->lineItem($Container); |
Input |
|
Return |
|
recalculateLineItem
Called to recalc the line item. And adds a payment discount if possible.
Syntax |
$PaymentMethod->recalculateLineItem($LineItem); |
Input |
|