PHPackages                             akika/laravel-stanbic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. akika/laravel-stanbic

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

akika/laravel-stanbic
=====================

An unofficial package for Stanbic

v0.0.6(5mo ago)0387[4 PRs](https://github.com/akikadigital/laravel-stanbic/pulls)MITPHPPHP ^8.1CI passing

Since Jun 23Pushed 2mo agoCompare

[ Source](https://github.com/akikadigital/laravel-stanbic)[ Packagist](https://packagist.org/packages/akika/laravel-stanbic)[ Docs](https://github.com/akika/laravel-stanbic)[ GitHub Sponsors](https://github.com/Akika)[ RSS](/packages/akika-laravel-stanbic/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (13)Versions (11)Used By (0)

Laravel Stanbic
===============

[](#laravel-stanbic)

[![PHPStan](https://github.com/akikadigital/laravel-stanbic/actions/workflows/phpstan.yml/badge.svg)](https://github.com/akikadigital/laravel-stanbic/actions/workflows/phpstan.yml)[![run-tests](https://github.com/akikadigital/laravel-stanbic/actions/workflows/run-tests.yml/badge.svg)](https://github.com/akikadigital/laravel-stanbic/actions/workflows/run-tests.yml)

An unofficial package for Stanbic bank; following the ISO20022 standard.

Prerequisites
-------------

[](#prerequisites)

Configure `sftp` first before you proceed:

Add the SFTP configs in the `config/filesystem.php`. Below is the recommended set of configs. Ensure you set the corresponding env values in your `.env` as well:

```
'stanbic_sftp' => [
    'driver' => 'sftp',
    'host' => env('STANBIC_SFTP_HOST'),
    'port' => (int) env('STANBIC_SFTP_PORT', 22),
    'username' => env('STANBIC_SFTP_USERNAME'),
    'privateKey' => env('STANBIC_SFTP_PRIVATE_KEY'),
    'throw' => true,
],
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require akika/laravel-stanbic
```

You can publish the config file with (optional):

```
php artisan vendor:publish --tag="laravel-stanbic-config"
```

### Environment Variables

[](#environment-variables)

Add the following environment variables to your `.env` file:

```
# SFTP Connection Settings
STANBIC_SFTP_HOST=your-sftp-host.example.com
STANBIC_SFTP_PORT=22
STANBIC_SFTP_USERNAME=your-username
STANBIC_SFTP_PRIVATE_KEY=/path/to/your/private/key

# File System Configuration
STANBIC_FILESYSTEM_DISK=stanbic_sftp          # The disk to use for SFTP operations
STANBIC_INPUT_ROOT=Inbox                      # Directory where incoming reports are read from
STANBIC_OUTPUT_ROOT=Outbox                    # Directory where outgoing files are uploaded to

# Output File Naming
STANBIC_OUTPUT_FILE_PREFIX=MY_COMPANYC2C_Pain001v3_GH_TST_  # Prefix for generated files (include environment suffix)

# Report Processing
STANBIC_REPORTS_CLEANUP_AFTER_PROCESSING=true  # Remove processed reports from SFTP server to prevent re-processing

# Backup Settings
STANBIC_REPORTS_BACKUP_ENABLED=true            # Enable local backup of processed reports
STANBIC_REPORTS_BACKUP_DISK=local              # Local disk for storing report backups
STANBIC_REPORTS_BACKUP_ROOT=stanbic/reports    # Directory path within backup disk for storing reports
```

Usage
-----

[](#usage)

### Credit Transfer Initiation with Pain00100103

[](#credit-transfer-initiation-with-pain00100103)

This package provides a Laravel implementation for generating ISO 20022 PAIN.001.001.03 XML messages for credit transfers.

#### Basic Usage

[](#basic-usage)

```
