Package DE_EPAGES::Order::API::Object::LineItemPayment
object interface for LineItemPayment.
Base |
DE_EPAGES::Order::API::Object::LineItem |
Functions
checkAmount
This functions allows a payment line item to check if the ordered amount differs from the amount defined in the transaction. Overwrite this function for security checks in external payment or checkout methods.
Syntax |
$result = $PaymentLineItem->checkAmount; |
Return |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $LineItemPayment->className; |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $LineItemPayment->dbPackage; |
Return |
|
executePayment
This function allows a payment line item to initiate the payment process. Override this function to interrupt the basket processing, for example to display additional pages for collection payment information. The default implementation does nothing. Called by DE_EPAGES::Order::Hooks::Basket::OnBasket2OrderExecutePayment Called by DE_EPAGES::Order::Hooks::Order::OnOrderExecutePayment
Syntax |
$PaymentLineItem->executePayment($hValues); |
Example |
sub executePayment { my $self = shift; my ($hParams)= @_; my $Object = defined $hParams->{'Order'} ? $hParams->{'Order'} : $hParams->{'Basket'}; my $Servlet = $hParams->{'Servlet'}; # display the credit card form $Servlet->vars('ObjectID', $Object->id); Error('INVALID_FORM', { 'ViewVars'=> { 'FormError' => 0, }, 'ViewAction' => 'ViewCreditCardForm', }); return; } |
Input |
|
hirePurchase
This function allows a payment line item to initiate hire purchase (or payment in rates). The default implementation checks if hire purchase is posssible for the current basket with the slected payment method ($self->get('IsHirePurchaseAllowed')) and if hire purchase has not already been activated for the basket ($self->get('IsHirePurchaseOK')). It displays the hire purchase form using the ViewPaymentHirePurchase action. Override this function to display a custom hire purchase form. Called by DE_EPAGES::Order::Hooks::Basket::OnBasket2OrderHirePurchase
Syntax |
$PaymentLineItem->hirePurchase($hValues); |
Input |
|
prepareOrder
This functions allows a payment line item to prepare a basket for the payment process. The default implementation does nothing. Called by DE_EPAGES::Order::Hooks::Basket::OnBasket2OrderPayment
Syntax |
$PaymentLineItem->prepareOrder($hValues); |
Input |
|
recalculate
Standard payment lineitems call the PaymentMethod function DE_EPAGES::Order::API::Object::ContainerPaymentMethod::recalculateLineItem to recalculate the item. Resets the HirePurchase attributes if the line item container ShippingSubTotal is changed.
Syntax |
$LineItemPayment->recalculate($Container, $hValues); |
Input |
|