ePages 7.25.0 - DE_EPAGES/AmazonPayments/API/AmazonWidgetUtil.pm

Package DE_EPAGES::AmazonPayments::API::AmazonWidgetUtil

Provides functions for retrieval of Amazon Urls

Functions

getActiveAmazonRegion
getAmazonButtonUrl
getAmazonWidgetUrl
new

getActiveAmazonRegion

Returns the Amazon region code, if any, to use in the Storefront.

Syntax
getActiveAmazonRegion($PaymentMethod, $Basket)
Input
$PaymentMethod (object)
AmazonPayments payment method
$Basket (object)
Basket for this payment
Return
$Region (string)
Region (DE, UK or US) to show in the Storefront or undef if none

getAmazonButtonUrl

Returns an Url to load the AmazonPayments button from

Syntax
getAmazonButtonUrl($PaymentMethod, $Region)
Input
$PaymentMethod (object)
AmazonPayments payment method
$Region (string)
Region for the widget
Return
$Url (string)
Url to load the button from

getAmazonWidgetUrl

Returns an Url to load the AmazonPayments widget from

Syntax
getAmazonWidgetUrl($PaymentMethod, $Region)
Input
$PaymentMethod (object)
AmazonPayments payment method
$Region (string)
Region for the widget
Return
$Url (string)
Url to load the widget from

new

create a new AmazonWidgetUtil

Syntax
$AmazonWidgetUtil = new DE_EPAGES::Object::API::AmazonWidgetUtil;
Return
$AmazonWidgetUtil (object)
blessed object