detain/myadmin-amazon-payments

Amazon handling plugin for MyAdmin

Maintainers

Package info

github.com/myadmin-plugins/amazon-payments

Type:myadmin-plugin

pkg:composer/detain/myadmin-amazon-payments

Statistics

Installs: 302

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 1

v2.0.0 2019-04-04 08:06 UTC

This package is auto-updated.

Last update: 2026-03-19 15:56:25 UTC


README

Tests Latest Stable Version Total Downloads License

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, and amazon_addressbook_widget helper 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.