Manual card-transfer payment gateway for telegram-bot-essentials/billing

Maintainers

Package info

github.com/Telegram-Bot-Essentials/gateway-card

pkg:composer/telegram-bot-essentials/gateway-card

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.4 2026-09-01 12:27 UTC

This package is auto-updated.

Last update: 2026-09-02 12:18:11 UTC


README

Latest Version tests License: MIT

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

  1. Buyer picks "Card" on the Billing invoice screen → a ToCardAttempt is created and the card details are shown.
  2. Buyer sends a text/photo receipt → it's forwarded to transactions_chat_id with Accept / Reject buttons.
  3. 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.