Package DE_EPAGES::Payment::API::Object::PaymentMethod
object interface for PaymentMethod.
Base |
DE_EPAGES::Object::API::Object::Object |
Functions
canDelete
Test if the object can be deleted. In case of the default payment method a warning is added. The default payment method can't be deleted.
Syntax |
$Object->canDelete($aWarnings); |
Input |
|
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $PaymentMethod->className; |
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $PaymentMethod->dbPackage; |
Return |
|
featureName
Returns the feature name.
Syntax |
$FeatureName = $PaymentMethod->featureName; |
Return |
|
getLevels
Return the payment levels for the given currency in the requested tax model.
Syntax |
$ahLevels = $Object->getLevels($CurrencyID, $TaxModel); $ahLevels = $Object->getLevels($CurrencyID, $TaxModel, $ExtraPrecision); |
Input |
|
Return |
|
levels
Returns all payment level objects of that payment method.
Syntax |
$aPaymentLevels = $Object->levels; |
Return |
|
price
Returns the payment price by the given requirements. Needs to be implemented for a new payment method.
Syntax |
$PaymentPrice = $Object->price( $hVars ); |
Example |
$PaymentPrice = $PaymentMethod->price( { CurrencyID => 'USD', TaxModel => $PaymentMethod->getSite()->get('TaxModel') } ); |
Input |
|
Return |
|
setLevels
Sets all payment levels for the given currency. Deletes payment levels that are not included in the list. Calculates net prices from gross prices if $TaxModel is TAX_MODEL_GROSS.
Syntax |
$Object->setLevels($CurrencyID, $TaxModel, $ahLevels); |
Input |
|
usableAtStorefront
Tests if a payment method with the given currency is visible in the storefront. Uses function DE_EPAGES::Payment::API::Object::PaymentMethod::price to evaluate if payment methode has a price (price can be 0).
Syntax |
$Usable = $PaymentMethod->usableAtStorefront($hVars); |
Input |
|
Return |
|