Download the PHP package andreighioc/btipay without Composer
On this page you can find all versions of the php package andreighioc/btipay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andreighioc/btipay
More information about andreighioc/btipay
Files in andreighioc/btipay
Package btipay
Short Description Banca Transilvania Payment Gateway for Laravel
License MIT
Informations about the package btipay
BT iPay - Laravel Package
🇷🇴 Versiunea în română
Laravel package for integrating with the Banca Transilvania iPay payment platform.
Supports 1-Phase payments (automatic capture) and 2-Phase payments (pre-authorization + manual deposit), refunds, reversals, transaction status verification, and loyalty point payments (StarBT).
Requirements
- PHP 8.1+ (Laravel 13 requires PHP 8.3+)
- Laravel 10, 11, 12 or 13
- API credentials from Banca Transilvania
Installation
Full installation (config, migrations, controller, routes, views):
The BtiPay:install command creates:
config/BtiPay.php— configurationdatabase/migrations/—BtiPay_transactionstableapp/Http/Controllers/BtiPayController.php— complete controller withpay,process,finishroutes/BtiPay.php— web routes (/BtiPay/pay,/BtiPay/process,/BtiPay/finish)resources/views/BtiPay/— Blade views (pay.blade.php,finish.blade.php)
Optionally, publish only what you need:
After installation, include the routes in your app. In routes/web.php:
Or in bootstrap/app.php (Laravel 11+):
Configuration
Add to your .env:
Available Environments
| Environment | Description |
|---|---|
sandbox |
Test environment (https://ecclients-sandbox.btrl.ro) |
production |
Production environment (https://ecclients.btrl.ro) |
Supported Currencies (ISO 4217)
| Currency | Code |
|---|---|
| RON | 946 |
| EUR | 978 |
| USD | 840 |
Usage
1. Simple Payment (1-Phase)
2. Pre-Authorized Payment (2-Phase)
3. Reversal (Cancel Pre-Authorization)
4. Refund
5. Transaction Status Check
6. Shortcut: Get Payment URL
7. Finish Page (Return URL)
If you ran php artisan BtiPay:install, the controller and views are already created.
The route GET /BtiPay/finish is automatically registered as BtiPay.finish.
The generated controller (BtiPayController) automatically handles:
- Status verification via
getOrderStatusExtended.do - Transaction update in the database (card, amount, RRN, ECI, etc.)
- Display of all 22 required error messages
- Retry restrictions for action codes 803, 804, 913
- Event dispatch:
PaymentCompleted/PaymentDeclined
For custom integration, you can use the facade directly:
8. Tracking with BtiPayTransaction Model
9. Model Trait
10. Loyalty Point Payments (StarBT)
Events
The package dispatches the following events that you can listen for:
| Event | Description |
|---|---|
PaymentRegistered |
Payment has been registered with iPay |
PaymentCompleted |
Payment completed successfully (DEPOSITED) |
PaymentDeclined |
Payment was declined |
PaymentRefunded |
Refund processed (partial or full) |
Error Codes (Action Codes)
The 22 required error codes to handle per BT documentation:
| Code | Description |
|---|---|
| 104 | Restricted card |
| 124 | Transaction cannot be authorized per regulations |
| 320 | Inactive card |
| 801 | Issuer unavailable |
| 803 | Card blocked ⚠️ Do NOT retry with the same card! |
| 804 | Transaction not allowed ⚠️ Do NOT retry with the same card! |
| 805 | Transaction declined |
| 861 | Invalid expiration date |
| 871 | Invalid CVV |
| 905 | Invalid card |
| 906 | Expired card |
| 913 | Invalid transaction ⚠️ Do NOT retry with the same card! |
| 914 | Invalid account |
| 915 | Insufficient funds |
| 917 | Transaction limit exceeded |
| 952 | Suspected fraud |
| 998 | Installments not allowed with this card |
| 341016 | 3DS2 authentication declined |
| 341017 | 3DS2 status unknown |
| 341018 | 3DS2 cancelled by customer |
| 341019 | 3DS2 authentication failed |
| 341020 | 3DS2 unknown status |
Package Structure
License
MIT License
Contact
For BT iPay API issues: [email protected]
All versions of btipay with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.0