detain / myadmin-amazon-payments
Amazon handling plugin for MyAdmin
Package info
github.com/myadmin-plugins/amazon-payments
Type:myadmin-plugin
pkg:composer/detain/myadmin-amazon-payments
Requires
- php: >=5.0.0
- ext-soap: *
- detain/myadmin-plugin-installer: dev-master
- symfony/event-dispatcher: >=2.8.26
Requires (Dev)
- codacy/coverage: dev-master
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: *
- phpunit/phpunit-mock-objects: *
- satooshi/php-coveralls: *
- vlucas/phpdotenv: *
This package is auto-updated.
Last update: 2026-03-19 15:56:25 UTC
README
An Amazon Payments integration plugin for the MyAdmin control panel. This package provides support for processing payments through Amazon Pay, including wallet and address book widgets, OAuth-based profile retrieval, and configurable sandbox/live environment switching.
Features
- Amazon Pay wallet and address book widget rendering
- OAuth 2.0 access token verification and user profile retrieval
- Configurable sandbox and live environment support
- Event-driven architecture via Symfony EventDispatcher hooks
- Admin settings panel for Client ID, Seller ID, and environment toggling
Requirements
- PHP >= 5.0
- ext-soap
- ext-curl
- symfony/event-dispatcher ^5.0
Installation
Install via Composer:
composer require detain/myadmin-amazon-payments
Configuration
The plugin registers the following settings through the MyAdmin settings system:
| Setting | Description |
|---|---|
amazon_checkout_enabled |
Enable or disable Amazon Checkout |
amazon_sandbox |
Toggle sandbox/test environment |
amazon_client_id |
Your Amazon Pay Client ID |
amazon_seller_id |
Your Amazon Pay Seller ID |
Usage
The plugin hooks into MyAdmin's event system automatically. Once installed, it registers:
- system.settings -- Adds Amazon payment configuration fields to the admin panel.
- function.requirements -- Registers the
amazon_obtain_profile,amazon_wallet_widget, andamazon_addressbook_widgethelper functions.
Widget Functions
// Render the Amazon address book widget
$html = amazon_addressbook_widget();
// Render the Amazon wallet/payment widget
$html = amazon_wallet_widget();
Profile Retrieval
// Validate an access token and retrieve the Amazon user profile
amazon_obtain_profile();
Running Tests
composer install
vendor/bin/phpunit
License
This package is licensed under the LGPL-2.1 license.