sadi01/yii2-open-banking

Yii2 Open Banking Service

dev-master 2024-07-18 09:30 UTC

This package is auto-updated.

Last update: 2024-12-18 10:31:58 UTC


README

Open banking extension for Yii 2


Yii2 Open Banking

Openbanking is an extension for integrating the service calls of various banking platforms, including Faraboom, Finotech, Shaheen, and Shahkar.

This extension enables the unified management of calling various banking services for the Yii framework 2.0.

For license information check the LICENSE-file.

Installation

Using Composer (Preferred Method):

The preferred way to install this extension is through composer:

composer require --prefer-dist sadi01/yii2-open-banking"*"

Alternative Method:

If you prefer adding the openbanking extension to your composer.json file manually, you can do so by adding the following entry to the require section:

{
  "require": {
    "sadi01/yii2-open-banking": "*"
  }
}

After adding the entry, save the composer.json file and run the following command in the terminal or command prompt within your project directory:

composer update

This command will fetch and install the openbanking extension and its required dependencies into your Yii 2 project.

Configuration

To use this extension, you have to configure the openbanking module in your application configuration:

return [
    //....
    'modules' => [
       'openbanking' => [
            'class' => 'sadi01\openbanking\Module'
        ],
    ]
];

and you have to configure the openbanking component in your application configuration:

return [
    //....
    'components' => [
       'openBanking' => [
            'class' => 'sadi01\openbanking\components\OpenBanking',
            'bsVersion' => 4 //your project bs version
        ],
    ]
];

DB Migrations

Run module migrations:

php yii migrate --migrationPath=@sadi01/openbanking/migrations

Or, Add migrations path in console application config:

'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationNamespaces' => [],
        'migrationPath' => [
            '@vendor/sadi01/yii2-open-banking/src/migrations',
            '@app/migrations'
        ]
    ],
],

How To Use

add to your code:

Yii::$app->openBanking->call('','',[])

Advanced config