ePages 7.19.0 - DE_EPAGES/Payment/API/TLE/PaymentHandler.pm

Package DE_EPAGES::Payment::API::TLE::PaymentHandler

Implements TLE functions for payments.

Functions

CanUsePayment
DISCOUNT
PRICELIMIT

CanUsePayment

Calls canAddToBasket of #PaymentMethod to determine if #PaymentMethod can be added to #Container.

Syntax
#CanUsePayment(#PaymentMethod, #Container)
Example
#LOCAL("UsePayment", #CanUsePayment(#PaymentMethod.Object, #LineItemContainer.Object))
Input
#Processor (object)
tle processor
#PaymentMethod (object)
payment method object
#Container (object)
container object, e.g. #LineItemContainer
Return
#Result (boolean)
true if #PaymentMethod can be added to #Container

DISCOUNT

Returns the discount or fee of a payment method for a given currency.

Syntax
#DISCOUNT(#PaymentMethod, #Currency)
Example
#LOCAL("CurrencyID", #INPUT.Currency)
  #LOCAL("Discount", #DISCOUNT(#PaymentMethod,#CurrencyID))
    #IF(#DEFINED(#Discount))
      #Discount[money]
    #ENDIF
  #ENDLOCAL
#ENDLOCAL
Input
#Processor (object)
tle processor
#PaymentMethod (object)
product object
#CurrencyID (string)
currency code, e.g. "EUR"

PRICELIMIT

Returns the price limit of a payment method for a given currency and tax model.

Syntax
#PRICELIMIT(#Type, #PaymentMethod, #Currency)
Example
#LOCAL("CurrencyID", #INPUT.Currency)
  #LOCAL("ListPrice", #PRICELIMIT(#Type, #PaymentMethod))
    #IF(#DEFINED(#ListPrice))
      #ListPrice[money]
    #ENDIF
  #ENDLOCAL
#ENDLOCAL
Input
#Processor (object)
tle processor
#Type (string)
type of price value MinPriceValue or MaxPriceValue
#PaymentMethod (object)
product object
#CurrencyID (string)
currency code, e.g. "EUR"