Search by

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

Statistics

Installs: 25

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.0.5 2026-10-12 13:27 UTC

This package is auto-updated.

Last update: 2026-10-12 13:32:46 UTC


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