Hyvä Compatibility module for Amazon_Pay
"php": "^8.2.0",
"hyva-themes/magento2-default-theme": "^1.2.0",
"hyva-themes/magento2-hyva-checkout": "^1.0.2",
https://github.com/amzn/amazon-payments-magento-2-plugin
- Credentials
- Amazon Pay (Enabled)
- Public Key ID
- Merchant Id
- Store Id
- Payment Region
- Sandbox
- Options
- Multi-currency Functionality
- Amazon Sign-in (partial, only during checkout)
- Payment
- Authorization Mode
- Alexa Delivery Notifications
- Alexa Delivery Notifications (not tested, maybe it will work)
- Advanced
- Frontend
- Button Display Language
- Button Color
- Amazon Pay button on product page
- Amazon Pay button in minicart
- Amazon Pay in final checkout step
- Sales Options
- Store Name (not tested, maybe it will work)
- Restrict Product Categories (not tested, maybe it will work)
- Shipping Restrictions
- Restrict Post Office Boxes (not tested, maybe it will work)
- Restrict Packstations (not tested, maybe it will work)
- Developer Options
- Logging
- Amazon checkout review return URL
- Magento Checkout URL Path
- Amazon checkout result return URL
- Sign In result URL Path
- Magento Checkout result URL Path
- Amazon Checkout cancel URL Path
- Amazon Sign In cancel URL Path
- Allowed IPs
- Frontend
You can use the AmazonPayRendererViewModel
to render the Pay Button wherever you want.
...
$amazonPayRendererViewModel = $viewModels->require(\Hyva\AmazonPay\ViewModel\AmazonPayRendererViewModel::class);
...
<?= $amazonPayRendererViewModel->renderPayButton() ?>
...
The offical Amazon Pay module makes it very difficult to only load when the user has accepted.
There is a new config setting to make this a little bit easier:
Store Configuration > Sales > Payment Methods > Amazon Pay > Advanced > Hvva Checkout > Script Attributes
Here you can define a JSON string to add additional attributes to the initial script tag.
Example:
{
"type": "text/plain",
"cmdVendor": "123"
}
Hyvä Compatibility modules that are tagged as stable can be installed using composer via packagist.com:
- Install via composer
composer require hyva-themes/hyva-checkout-amazon-pay:dev-dev
- Enable module
bin/magento setup:upgrade
For development of or to contribute to this module, it needs to be installed using composer via gitlab.
This installation method is not suited for deployments, because gitlab requires SSH key authorization.
-
Install via composer If this is the first time a compatibility module is installed via gitlab, the compat-module-fallback git repository has to be added as a composer repository. This step is only required once.
composer config repositories.hyva-themes/magento2-compat-module-fallback git [email protected]:hyva-themes/magento2-compat-module-fallback.git
When the compat-module-fallback repo is configured, the compatibility module itself can be installed with composer:
composer config repositories.hyva-themes/hyva-checkout-amazon-pay git [email protected]:hyva-checkout/checkout-integrations/hyva-checkout-amazon-pay.git composer require hyva-themes/hyva-checkout-amazon-pay:dev-dev
-
Enable module
bin/magento setup:upgrade