Download the PHP package 3neti/messaging-bot without Composer

On this page you can find all versions of the php package 3neti/messaging-bot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package messaging-bot

Messaging Bot Package

Multi-channel messaging bot for PayCode voucher operations. Currently supports Telegram, with WhatsApp and Viber planned for future phases.

Features

Installation

The package is included in the mono-repo. Add it to your host app's composer.json:

Then run:

Configuration

Publish the config file:

Environment Variables

Setting Up Telegram

1. Create a Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the bot token to TELEGRAM_BOT_TOKEN

2. Set Webhook

Set your webhook URL (replace with your domain):

Or use the driver directly:

3. Local Development

For local development, use the test command to simulate messages:

Alternatively, use long polling for real Telegram interaction:

Available Commands

Public Commands

Command Description
/start Welcome message
/help Show available commands
/balance Check wallet balance (requires linked account)
/redeem Start voucher redemption flow
/cancel Cancel current operation

Admin Commands

Command Description
/generate Generate multiple vouchers
/disburse Quick single-voucher creation

Deep Links

Telegram deep links allow users to start redemption with a single click:

Format: start=action_param (underscore separator)

Examples:

When a user clicks a deep link:

  1. Telegram opens and starts the bot
  2. Bot automatically validates the voucher code
  3. User sees amount and is prompted to share phone (or confirm if returning user)

Redemption UX Flow

First-Time User (3 steps)

Returning User (2 steps)

Phone number is cached for 30 days after successful redemption:

Architecture

Adding a New Handler

Create a handler extending BaseMessagingHandler:

Register in config:

Adding a New Flow

Create a flow extending BaseFlow:

Webhook Endpoints

Platform Endpoint
Telegram POST /messaging/telegram/webhook
WhatsApp POST /messaging/whatsapp/webhook (planned)
Viber POST /messaging/viber/webhook (planned)

Testing

Unit Tests

Manual Testing

License

Proprietary - All rights reserved.


All versions of messaging-bot with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/cache Version ^11.0|^12.0
illuminate/routing Version ^11.0|^12.0
spatie/laravel-data Version ^4.0
guzzlehttp/guzzle Version ^7.0
3neti/voucher Version ^0.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 3neti/messaging-bot contains the following files

Loading the files please wait ...