idez/laravel-bankly-sdk

This is my package laravel-bankly-sdk


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads Test Coverage

Unnofficial PHP class to access Bankly (by Acesso) API.

Installation

You can install the package via composer:

composer require idez/laravel-bankly-sdk

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravel-bankly-sdk-migrations"

You can publish the config file with:

php artisan vendor:publish --tag="laravel-bankly-sdk-config"

This is the contents of the published config file:

return [
    'client' => env('BANKLY_CLIENT'), /* @deprecated */
    'secret' => env('BANKLY_SECRET'), /* @deprecated */
    'env' => env('APP_ENV', 'staging'),
    'webhooks' => [
        'public_key' => env('BANKLY_WEBHOOK_PUBLIC_KEY'),
        'hmac_salt' => env('BANKLY_WEBHOOK_HMAC_SALT'),
    ],
    'branch' => env('BANKLY_BRANCH', '0001'),
    'default_scopes' => env('BANKLY_SCOPES', []),
    'company_key' => env('BANKLY_COMPANY_KEY'),
    'mTls' => [
        'certificate_path' => env('BANKLY_MTLS_CERT_PATH'),
        'private_key_path' => env('BANKLY_MTLS_PRIVATE_KEY_PATH'),
        'passphrase' => env('BANKLY_MTLS_PASSPHRASE'),
    ],
    'oauth2' => [
        'client_id' => env('BANKLY_OAUTH2_CLIENT_ID'),
    ]
];

Usage

$bankly = new Idez\Bankly();
$qrCodeObject =  $bankly->pix()->createStaticQrCode(
        keyType: 'evp',
        keyValue: 'd8b3c33f-9bc9-4444-8716-d7a6d243e55e',
        amount: 100.00,
        conciliationId: 'kE7nFQCy5YCFRuQ4',
        recipientName: 'Idez',
        locationCity: 'Porto Alegre',
        locationZip: '57499335',
        singlePayment: false
    );

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.