Admin Payment
Composer package kowal/module-adminpayment · repository version 1.0.3
Product page
Description
This module adds an offline payment method named adminpayment, intended for use only in the Magento Admin Panel. The method is registered as a standard Magento payment method and includes its own checkout renderer, but its availability is restricted to the adminhtml area via the payment_method_is_active event observer.
For whom
For operations and customer support teams that create orders from the Admin Panel and need a dedicated payment method that is not available to customers on the storefront.
Features
- Registers the
adminpaymentpayment method as offline (_isOffline = true) with the default order status set topendingand the titleAdminPayment. - Restricts
adminpaymentavailability to theadminhtmlarea via thepayment_method_is_activeobserver. - Provides a checkout renderer and payment template for
adminpaymenton the frontend (JS + template), even though the method is disabled there by default. - Supports configuration options: enable/disable, title, new order status, sort order, instructions, allowed countries restriction.
Installation
* = in production use the --keep-generated option
- Add the repository to your configuration:
composer config repositories.module.admin.payment vcs https://github.com/kowalco/magento-2-admin-payment - Add an access token for private GitHub:
composer config --global --auth github-oauth.github.com <YOUR_TOKEN> - Install the module via Composer:
composer require kowal/module-adminpayment - Enable the module:
php bin/magento module:enable Kowal_AdminPayment - Apply database updates:
php bin/magento setup:upgrade - Flush cache:
php bin/magento cache:flush
Configuration
- Admin path: Stores > Configuration > Sales > Payment Methods > AdminPayment.
- Configuration scopes:
default,website,store view(all fields haveshowInDefault/Website/Store = 1). - Configuration keys:
payment/adminpayment/active,payment/adminpayment/title,payment/adminpayment/order_status,payment/adminpayment/allowspecific,payment/adminpayment/specificcountry,payment/adminpayment/sort_order,payment/adminpayment/instructions.
Requirements / notes
- No dependencies are declared in
composer.jsonandetc/module.xml; the module assumes standard Magento modules used by configuration and checkout are present (includingMagento_Payment,Magento_Checkout,Magento_Config,Magento_Sales,Magento_Directory,Magento_Store). - No custom
acl.xml; configuration is placed in the standardpaymentsection.
Deployment and operations
- No patches, installers, or DB changes in the module (no
Setup/*and no patches). - Includes frontend assets (JS + template), which require Magento’s standard static content deployment process.
- No defined
cronjobs, queues (queue), or custom indexes.
Deployment checklist
- Install the module via Composer and enable it according to the README instructions.
- Run
setup:upgradeandcache:flushas described in the README. - Verify the payment method configuration in Admin (scopes: default/website/store view).
- Check that the method is available when creating an order in the Admin Panel.
CI/CD and environments
- The repository includes a
.gitlab-ci.ymlwith a singleteststage and SAST enabled (no additional build/test steps).
Rollback
- No rollback procedure is described in the repository.
Compatibility
- No Magento/PHP version declarations are present in the repository.
FAQ
- Is the method available on the storefront? No. The
payment_method_is_activeobserver disablesadminpaymentoutside theadminhtmlarea. - Does the module modify the database? No. No DB patches or installers were found in the repository.
- Which Magento versions are supported? No information is provided in the code or README.
Verify the installation
bin/magento module:status Kowal_AdminPayment
Start an order in the admin panel and inspect the payment options. Open checkout as a customer of the same store. The administrative payment method should appear only in the panel.
When country restrictions are enabled, repeat the Admin test with a billing address in an allowed country and one outside the list.