ttechnos / telebirr
Laravel package for Telebirr payment integration
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/ttechnos/telebirr
Requires
- php: ^7.4|^8.0
- ext-openssl: *
- phpseclib/phpseclib: ^3.0
- spatie/crypto: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2025-11-27 21:29:28 UTC
README
A Laravel package to integrate Telebirr payment gateway. Provides easy methods to create orders, get Fabric tokens, and verify signatures.
1 Setup
1. Add environment variables
Add the following to your .env file:
TELEBIRR_PRIVATE_KEY_PATH=storage/app/telebirr/keys/private_key.pem TELEBIRR_PUBLIC_KEY_PATH=storage/app/telebirr/keys/public_key.pem TELEBIRR_WEB_BASE_URL=https://developerportal.ethiotelebirr.et:38443/payment/web/paygate? TELEBIRR_BASE_URL=https://developerportal.ethiotelebirr.et:38443/apiaccess/payment/gateway TELEBIRR_FABRIC_APP_ID= TELEBIRR_APP_SECRET= TELEBIRR_MERCHANT_APP_ID= TELEBIRR_MERCHANT_CODE= TELEBIRR_SSL_VERIFY=false
Note: Fill in your Fabric App ID, App Secret, Merchant App ID, and Merchant Code.
2. Copy the keys
Place your keys in the path specified in .env:
storage/app/telebirr/keys/private_key.pem
storage/app/telebirr/keys/public_key.pem
Do not commit the private key to version control.
3. Publish config (optional)
php artisan vendor:publish --tag=telebirr-config php artisan vendor:publish --tag=telebirr-keys
This will copy the config and keys into your Laravel project.
2 Installation
Install via Composer:
composer require ttechnos/telebirr:dev-main
3 Usage
Using the Facade
use Ttechnos\Telebirr\Facades\Telebirr; // Get Fabric token $token = Telebirr::getFabricToken(); // Create an order $order = Telebirr::createOrder('Test Product', 100.50, [ 'description' => 'Payment for test product', ]);
Using the Service directly
$telebirr = app('telebirr'); $token = $telebirr->getFabricToken(); $order = $telebirr->createOrder('Test Product', 100.50); $isValid = $telebirr->verifySignature($data);
5 License
MIT License.