telegram-bot-essentials / gateway-admin
One-click admin payment gateway for telegram-bot-essentials/billing
Package info
github.com/Telegram-Bot-Essentials/gateway-admin
pkg:composer/telegram-bot-essentials/gateway-admin
Requires
- php: ^8.3
- brick/math: ^0.14.2 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19
- laravel/framework: ^12 || ^13
- telegram-bot-essentials/billing: ~0.0.38
- telegram-bot-essentials/essence: ^0.18
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^10.0 || ^11.0
- pestphp/pest: ^3.7 || ^4.0
- pestphp/pest-plugin-laravel: ^3.1 || ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A one-click "pay as admin" gateway for
telegram-bot-essentials/billing.
Every invoice gets a 👑 Pay as admin button that only users holding the
gateway-admin.payments.manage permission see (with essence alone: the bot owner and the
developer). Pressing it settles the invoice at once: no money
moves, the invoice is marked paid through the normal InvoicePaid flow, and an
AdminPaymentAttempt records which admin paid it and for how much.
Use it to grant a service for free, compensate a member, or settle an invoice paid outside the bot.
Installation
composer require telegram-bot-essentials/gateway-admin php artisan migrate
No config and no settings: the provider registers the gateway and its callback query.
How it behaves
- The button shows on every invoice an admin views, including their own purchases, next to every other gateway.
- A double tap pays once: the invoice row is locked and an already-paid invoice answers "This invoice is already paid." instead.
- Each payment is written to the audit log (
Paid invoice #12 of 150000 as admin). - A consuming app that refunds orders can tell an admin-paid invoice by its payment attempt
(
$invoice->paymentAttempt instanceof AdminPaymentAttempt) and skip crediting money that was never received.
Testing
composer test
composer lint
composer analyse