ePages 6.17.9 - DE_EPAGES/AmazonPayments/API/Object/PaymentMethodAmazonPayments.pm

Package DE_EPAGES::AmazonPayments::API::Object::PaymentMethodAmazonPayments

object interface for Payment.

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

Functions

callbackUrl
canAddToBasket
client
featureName
regionForSF
regionKeys
regions
usableAtStorefront

callbackUrl

Returns the callbackUrl for instant payment notifications. Only returns a value, if the shop/site has an ssl certificate. Having a vaild (!) SSL certificate is an IPN requirement.

Syntax
my $Url = $PaymentMethod->callbackUrl;
Return
$Url (DE_EPAGES::AmazonPayments::API::Object::AmazonRestClient)
IPN callback url

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, USD

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

client

Returns an initialized AmazonRestClient

Syntax
my $Client = $PaymentMethod->client($hArgs);
Input
$hArgs (ref.hash)
additional arguments for the client
  • refid | Amazon order reference id (optional) | string
Return
$Client (DE_EPAGES::AmazonPayments::API::Object::AmazonRestClient)
AmazonRestClient

featureName

Returns the feature name 'AmazonPayments'.

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

regionForSF

Returns the region id that should be used with a given locale and currency.

Syntax
my $RegionID = $PaymentMethod->regionForSF($LocaleID, $CurrencyID)
Input
$LocaleID (string)
the locale to check
$CurrencyID (string)
the currency to check
Return
$RegionID (string)
the id of the Amazon Payment Region that matches the locale and currency.
undef if there is no matching region activated

regionKeys

Return a set of keys for a given region

Syntax
$hRegionKeys = $PaymentMethod->regionKeys($Region);
Input
$Region (string)
one of DE, UK, US
Return
$hRegionKeys (ref.hash)

  • DeveloperKey | developer key | string
  • AccessKeyId | access key | string
  • SecretKey | secret key | string
  • MerchantID | Amazon seller ID | string

regions

Returns all regions that are supported by Amazon Payments. Use activeRegions to get the regions that are actually usable in the current database.

Syntax
$hRegions = $PaymentMethod->regions;
Return
$hRegions (ref.hash.hash)
a hash of regions, with region identifiers as keys
  • Label | text to display for this region on the region selection element
    in the MBO | string
  • IsActive | true if there are developer keys for this region | boolean

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