ePages 7.21.0 - DE_EPAGES/POSTPAY/API/Object/PaymentMethodPOSTPAY.pm

Package DE_EPAGES::POSTPAY::API::Object::PaymentMethodPOSTPAY

object interface for Payment.

Base
DE_EPAGES::Order::API::Object::ContainerPaymentMethod

Functions

canAddToBasket
featureName
recalculateLineItem
usableAtStorefront

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 Valid currencies are: EUR, GBP

Syntax
if ($PaymentMethod->canAddToBasket($hVars)) {...
Input
$hVars (ref.hash)
  • CurrencyID - alpha currency code (ISO 4217) - char(3)
  • TaxModel - gross or net price - int
Return
$canAddToBasket (boolean)
true if payment method can be used for the given currency

featureName

Returns undef as no feature is connected to this PaymentMethod.

Syntax
$FeatureName = $PaymentMethod->featureName;
Return
$FeatureName (String)
feature name (undef means no feature count)

recalculateLineItem

Recalculate a payment line item when something has changed on basket.

Syntax
$PaymentMethodPOSTPAY->recalculateLineItem( $LineItem, $hValues);
Input
$LineItem (object)
line item
$hValues (ref.hash)
possible keys which was changed
  • Amount - amount (optional)- float
  • .... (optional)- ...

usableAtStorefront

Tests if a payment method is visible in the storefront. Overrides function DE_EPAGES::Payment::API::Object::PaymentMethod::usableAtStorefront to evaluate if payment method is configured

Syntax
$Usable = $PaymentMethod->usableAtStorefront($hVars);
Input
$hVars (ref.hash)
  • CurrencyID - alpha currency code (ISO 4217) - char(3)
  • TaxModel - gross or net price - int
Return
$Usable (boolean)
true if payment method is usable in the storefront