PHPackages                             sha443/bml-connect - 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. [API Development](/categories/api)
4. /
5. sha443/bml-connect

ActiveLibrary[API Development](/categories/api)

sha443/bml-connect
==================

A laravel package for Bank of Maldives Connect API v2.0.

1.05(4y ago)229MITPHPPHP &gt;=7.3

Since Jul 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sha443/bml-connect)[ Packagist](https://packagist.org/packages/sha443/bml-connect)[ RSS](/packages/sha443-bml-connect/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)DependenciesVersions (10)Used By (0)

BMLConnect
==========

[](#bmlconnect)

`sha443/bml-connect` is a laravel package for Bank of Maldives Connect API v2.0.

Pre-requisites
--------------

[](#pre-requisites)

- Requires PHP 7.3 or higher
- Laravel 5.5 or higher
- `production` or `sandbox` API key \[get from [BML Merchant Portal](https://dashboard.merchants.bankofmaldives.com.mv/)\]

Installation &amp; Setup
------------------------

[](#installation--setup)

`composer require sha443/bml-connect`

Don't forget to run `composer dump-autoload`

Set `BML_CLIENT_SECRET` and `BML_CLIENT_ID`in the `.env` file

Quick Start
-----------

[](#quick-start)

If you want to get a `sandbox` client:

```
use SHA443\BMLConnect\Client;

$client = new Client("sandbox");
```

If you want to get a `production` client:

```
use SHA443\BMLConnect\Client;

$client = new Client(); // passing 'production' is optional
//or
$client = new Client("production");
```

If you want to pass additional [GuzzleHTTP](https://github.com/guzzle/guzzle) options:

```
use SHA443\BMLConnect\Client;

$options = ['headers' => ['foo' => 'bar']];
$client = new Client('sandbox', $options);
```

Operations
----------

[](#operations)

### Available operations:

[](#available-operations)

- Create transaction with a specific payment method
- Create transaction without a specific payment method
- Get a transaction details
- List all transactions (with pagination)
- Verify signature

#### Create transaction with a specific payment method

[](#create-transaction-with-a-specific-payment-method)

```
use SHA443\BMLConnect\Client;

$client = new Client();

$json = [
 "provider" => "bml_epos", // Payment method enabled for your merchant account such as bcmc, alipay, card, bml_epos
 "currency" => "MVR",
 "amount" => 1000, // 10.00 MVR, transaction amount should be an integer ([in Laari](https://en.wikipedia.org/wiki/Maldivian_laari))
 "localId" => "Test_001", // your reference id
 "redirectUrl" => "https://example.com/order/123" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
return redirect($transaction["url"]); // Go to transaction payment page
```

#### Create transaction without a payment method that will redirect to the payment method selection screen

[](#create-transaction-without-a-payment-method-that-will-redirect-to-the-payment-method-selection-screen)

```
use SHA443\BMLConnect\Client;

$client = new Client();

$json = [
 "currency" => "MVR",
 "amount" => 1000, // 10.00 MVR, transaction amount should be an integer ([in Laari](https://en.wikipedia.org/wiki/Maldivian_laari))
 "localId" => "Test_001", // your reference id
 "redirectUrl" => "https://example.com/order/987" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
return redirect($transaction["url"]); // Go to transaction payment page
```

#### Verify a transaction signature locally

[](#verify-a-transaction-signature-locally)

You'll get a response from BML as `transactionId=xxxxx&state=CONFIRMED&signature=xxx`

```
use SHA443\BMLConnect\Client;
use SHA443\BMLConnect\Models\Transaction;
use SHA443\BMLConnect\Traits\Signature;

$client = new Client();

$json = [
 "currency" => "MVR",
 "amount" => 1000
];

$transaction = (new Transaction())->fromArray($json);
$verified = (new Signature($transaction))->verify($signature);
```

About Me
--------

[](#about-me)

Developer: [Shahidul Islam](https://github.com/sha443)Email: ,

*Any bug report/feature request is welcomed.*

#### Courtesy

[](#courtesy)

This package is built on [bml-connect-php](https://github.com/bankofmaldives/bml-connect-php) but does not rely on it. It's a modified laravel friendly-package distributed under MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

9

Last Release

1768d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f877fbfe8e5ef1579c4e2f261a60bcc2ae0eae46282912f7b672c9e0c0c343?d=identicon)[sha443](/maintainers/sha443)

---

Top Contributors

[![sha443](https://avatars.githubusercontent.com/u/17982466?v=4)](https://github.com/sha443 "sha443 (2 commits)")

---

Tags

laravelbml

### Embed Badge

![Health badge](/badges/sha443-bml-connect/health.svg)

```
[![Health](https://phpackages.com/badges/sha443-bml-connect/health.svg)](https://phpackages.com/packages/sha443-bml-connect)
```

###  Alternatives

[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
