Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Alfa Sign
    • Algolia
    • Algolia Webshop
    • API
    • Audit
    • Avatars
    • BTRL (Banca Transilvania iPay)
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Emag Checker
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • System Notifications
    • Localisation
    • Lockable Models
    • Logs
    • Mails
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Projects
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Send SMS (Sendsms.ro)
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Sunrise Sunset
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

BTRL (Banca Transilvania iPay)

LicenseStablePHP

Description

BTRL integrates Laravel Enso payment flows with the Banca Transilvania iPay API.

The package stores the remote credentials, exposes the settings API used by the admin UI, registers payment intents against the Banca Transilvania gateway, persists card transaction attempts locally, and refreshes transaction status from the remote platform.

It is intended for private deployments that need Banca Transilvania iPay as an online card-payment gateway.

Installation

This is a proprietary package distributed through the private Enso registry or a private path repository.

Run the package migrations after installation:

php artisan migrate

Then configure the integration from the BTRL settings screen. The settings record stores:

  • API endpoint URLs
  • account credentials (username, password)
  • enabled flag

Optional config publish:

php artisan vendor:publish --tag=btrl-config

Config file: config/enso/btrl.php

return [
    'settingsId' => env('BTRL_SETTINGS_ID', 1),
];

Features

  • Settings API for enabling the integration and storing credentials.
  • Register service for creating remote payment orders and returning the hosted formUrl.
  • Status service for synchronizing an existing CardTransaction with the remote gateway response.
  • Dedicated CardTransaction model with enum-casted local status, BT status, action code, request payload, and raw response data.
  • Tradable contract for application-specific payment subjects that can be registered with the gateway.
  • Standardized enums for transaction status, BT transaction status, action code, endpoint selection, and currency handling.
  • API and transaction exception handling.

Usage

Enable the integration from the settings form before using the payment flow.

Transactions are initiated and verified through the registered integration services.

To register a payment:

use LaravelEnso\Btrl\Services\Register;
use LaravelEnso\Btrl\Services\TestTransaction;
use LaravelEnso\People\Models\Person;

$paymentUrl = (new Register($customer, new TestTransaction()))->handle();

Register expects:

  • a LaravelEnso\People\Models\Person or LaravelEnso\Companies\Models\Company
  • a class implementing LaravelEnso\Btrl\Contracts\Tradable

The service creates a bt_card_transactions row before the remote call, stores the request payload, then persists the returned order reference and raw response.

To refresh a transaction:

use LaravelEnso\Btrl\Models\CardTransaction;
use LaravelEnso\Btrl\Services\Status;

(new Status(CardTransaction::find($id)))->handle();

The package exposes the following core service classes:

  • LaravelEnso\Btrl\Services\Register
  • LaravelEnso\Btrl\Services\Status
  • LaravelEnso\Btrl\Services\TestTransaction

API

HTTP routes

Settings:

  • GET api/integrations/btrl/settings
  • PATCH api/integrations/btrl/settings/{setting}

Core classes

ClassDescription
LaravelEnso\Btrl\Contracts\TradableContract for application transactions that can be registered with BTRL
LaravelEnso\Btrl\Models\SettingsSingleton settings model backed by bt_settings
LaravelEnso\Btrl\Models\CardTransactionLocal transaction log for each payment attempt
LaravelEnso\Btrl\Actions\RegisterDispatches the remote order-registration request
LaravelEnso\Btrl\Actions\StatusDispatches the remote status request
LaravelEnso\Btrl\Endpoints\RegisterForm-encoded endpoint using HTTP basic auth
LaravelEnso\Btrl\Endpoints\StatusForm-encoded endpoint using HTTP basic auth

Depends On

Required Enso packages:

  • laravel-enso/api:^1.14 ↗
  • laravel-enso/helpers for encrypted settings casts and exceptions
  • laravel-enso/people and laravel-enso/companies for supported customer models
  • laravel-enso/tables for TableCache on CardTransaction

Endpoint implementations return LaravelEnso\Api\Enums\Method, for example Method::POST.

Companion frontend package:

  • @enso-ui/btrl
Edit this page on GitHub
Last Updated: 5/26/2026, 8:41:40 AM
Prev
Avatars
Next
Cache Chain