telegram-bot-essentials / gateway-card
Manual card-transfer payment gateway for telegram-bot-essentials/billing
Package info
github.com/Telegram-Bot-Essentials/gateway-card
pkg:composer/telegram-bot-essentials/gateway-card
Requires
- php: ^8.3
- laravel/framework: ^12 || ^13
- telegram-bot-essentials/billing: ~0.0.32
- telegram-bot-essentials/essence: ^0.12
- telegram-bot-essentials/settings: ~0.0.17
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
README
A manual "pay by bank card transfer" gateway for
telegram-bot-essentials/billing.
There's no external payment processor: the buyer transfers money to a card number shown in
the bot, sends a receipt back, and an admin manually accepts or rejects the payment.
This is the simplest possible gateway implementation and a good reference for writing your own manual/offline gateway.
Installation
composer require telegram-bot-essentials/gateway-card php artisan migrate
No config file — everything is per-bot Settings:
| Setting key | Type | Purpose |
|---|---|---|
billing.gateways.card.status |
CHECKBOX |
Master on/off switch |
billing.gateways.card.card_number |
TEXT |
Card number shown to buyers |
billing.gateways.card.card_name |
TEXT |
Cardholder name shown to buyers |
billing.gateways.card.transactions_chat_id |
TEXT |
Chat where admins review receipts |
All four must be set for the gateway to appear on the invoice screen.
Flow
- Buyer picks "Card" on the Billing invoice screen → a
ToCardAttemptis created and the card details are shown. - Buyer sends a text/photo receipt → it's forwarded to
transactions_chat_idwith Accept / Reject buttons. - Admin accepts →
attemptSucceed()→Invoice::markAsPaid()→ Billing's paid hooks fire. Admin rejects → prompts for a reason →attemptFailed()→Invoice::markAsFailed().
Documentation
Full documentation, including the ToCardAttempt model and a step-by-step template for
building your own manual gateway, lives on the Telegram Bot Essentials documentation site
under Modules → Gateway: Card.
License
MIT.