rublex/laravel-aviagram-gateway

A Laravel payment gateway package for Aviagram

Maintainers

Package info

github.com/rublexgit/laravel-aviagram-gateway

pkg:composer/rublex/laravel-aviagram-gateway

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-03-29 12:46 UTC

This package is auto-updated.

Last update: 2026-03-29 12:46:22 UTC


README

Latest Version License

A Laravel payment gateway package for Aviagram integration.

Features

  • Payment initiation via Aviagram API
  • EUR-only currency enforcement
  • Configurable via environment variables
  • Laravel facade support

Installation

composer require rublex/laravel-aviagram-gateway

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Aviagram\AviagramServiceProvider" --tag="aviagram-config"

Add credentials to your .env file:

AVIAGRAM_BASE_URL=https://aviagram.app
AVIAGRAM_CLIENT_ID=
AVIAGRAM_CLIENT_SECRET=

Quick Start

use Aviagram\Data\OrderData;
use Aviagram\Facades\Aviagram;

$response = Aviagram::initiatePayment(
    new OrderData(
        id: 'INV-1774369486',
        amount: '15',
        currency: 'EUR',
    ),
    userCallbackUrl: 'https://your-app.example.com/finpay/final-callback'
);

// Unified wrapper response shape:
// [
//     'status' => 'pending',
//     'responseCode' => '2000000',
//     'responseMessage' => 'Initiated',
//     'orderId' => 'INV-1774369486',
//     'transactionId' => 'TRX-123',
//     'redirect_url' => 'https://aviagram.app/form/...',
//     'gatewayReference' => 'REF-123',
//     'raw' => [/* full provider payload */],
// ]

Provider-specific fields are preserved under raw.

Contract-Based Usage

use Aviagram\Services\AviagramGatewayService;
use Rublex\CoreGateway\Data\PaymentRequestData;

$gateway = app(AviagramGatewayService::class);

$result = $gateway->initiate(new PaymentRequestData(
    gatewayCode: $gateway->code(),
    orderId: 'INV-1',
    amount: '15',
    currency: 'EUR',
    callbackUrl: 'https://merchant.example/callback'
));

Backward Compatibility

  • initiatePayment(OrderData, string $userCallbackUrl) is available as the primary facade wrapper for payment initiation.
  • EUR currency constraints remain enforced.

Documentation

For installation and usage instructions, see USAGE.md.

License

This package is open-sourced software licensed under the MIT license.