ePages 6.17.39 - DE_EPAGES/ExternalPayment/API/Object/LineItemPaymentExternal.pm

Package DE_EPAGES::ExternalPayment::API::Object::LineItemPaymentExternal

object interface for LineItemPaymentExternal.

Base
DE_EPAGES::Order::API::Object::LineItemPayment

Functions

checkAmount
className
dbPackage
executePayment
getDisplayTransID
updateOnExecute

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
$result (boolean)
true if the ordered amount matches the transasctional amount

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $LineItemPaymentExternal->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $LineItemPaymentExternal->dbPackage;
Return
$DbPackage (String)
database package name

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);
Input
$hValues (ref.hash)
environment information
  • Basket - basket object (optional)
  • Servlet - servlet handling the current request
  • Order - order object (optional)

getDisplayTransID

The Payment transaction have two possible ID's: 1. TransID main transaction ID 2. TransID2 extra ID ( some cartridges could work with the main ID and this secondary ID for presentation purposes ) This method is a suitable way to return the ID to display in templates. By default we return the main ID ( TransID ) but a specialized cartridge could overwrite this method to return TransID2 ( or whatever ! ) The attribute 'DisplayTransID' in the class 'LineItemPaymentExternal' calls this method to return the presentation ID to any template which uses the attribute #DisplayTransID ( see template 'ContentLineLineItemPayment' in the 'BasePageType' )

Syntax
$DisplayTransID = $LineItemPayment->getDisplayTransID() ;
Return
$DisplayTransID (string)
TransID attribute

updateOnExecute

This functions sets amount and currency.

Syntax
$updateOnExecute($hParams);
Input
$hValues (ref.hash)
environment information
  • Basket - basket object
  • Servlet - servlet handling the current request
  • Order - order object (optional)