PHPackages                             zaruto/bml-connect-php - 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. zaruto/bml-connect-php

ActiveLibrary[API Development](/categories/api)

zaruto/bml-connect-php
======================

PHP Bindings for the BML Connect API

v2.1.0(4y ago)0116↓100%MITPHPPHP &gt;= 7.0

Since Jan 20Pushed 4y agoCompare

[ Source](https://github.com/zaruto/bml-connect-php)[ Packagist](https://packagist.org/packages/zaruto/bml-connect-php)[ RSS](/packages/zaruto-bml-connect-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

BMLConnectPHP
=============

[](#bmlconnectphp)

> PHP API Client and bindings for the [Bank of Maldives Connect API](https://github.com/bankofmaldives/bml-connect)

Using this PHP API Client you can interact with your Bank of Maldives Connect API:

- 💳 **Transactions**

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

[](#installation)

Requires PHP 8.0 or higher

The recommended way to install bml-connect-php is through [Composer](https://getcomposer.org):

First, install Composer:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, install the latest bml-connect-php:

```
$ composer require zaruto/bml-connect-php

```

Finally, you need to require the library in your PHP application:

```
require "vendor/autoload.php";
```

Development
-----------

[](#development)

- Run `composer test` and `composer phpcs` before creating a PR to detect any obvious issues.
- Please create issues for this specific API Binding under the [issues](https://github.com/bankofmaldives/bml-connect-php/issues) section.
- [Contact Bank of Maldives](https://dashboard.merchants.bankofmaldives.com.mv) directly for Bank of Maldives Connect API support.

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

[](#quick-start)

### BMLConnect\\Client

[](#bmlconnectclient)

First get your `production` or `sandbox` API key from [Merchant Portal](https://dashboard.merchants.bankofmaldives.com.mv).

If you want to get a `production` client:

```
use BMLConnect\Client;

$client = new Client('apikey', 'appid');
```

If you want to get a `sandbox` client:

```
use BMLConnect\Client;

$client = new Client('apikey', 'appid', 'sandbox');
```

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

```
use BMLConnect\Client;

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

Available API Operations
------------------------

[](#available-api-operations)

The following exposed API operations from the Bank of Maldives Connect API are available using the API Client.

See below for more details about each resource.

💳 **Transactions**

Create a new transaction with or without a specific payment method.

Usage details
-------------

[](#usage-details)

### 💳 Transactions

[](#-transactions)

#### Create transaction with a specific payment method

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

```
use BMLConnect\Client;

$client = new Client('apikey', 'appid');

$json = [
 "provider" => "alipay", // Payment method enabled for your merchant account such as bcmc, alipay, card
 "currency" => "MVR",
 "amount" => 1000, // 10.00 MVR
 "redirectUrl" => "https://foo.bar/order/123" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
header('Location: '. $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 BMLConnect\Client;

$client = new Client('apikey', 'appid');

$json = [
 "currency" => "MVR",
 "amount" => 1000, // 10.00 MVR
 "redirectUrl" => "https://foo.bar/order/987" // Optional redirect after payment completion
];

$transaction = $client->transactions->create($json);
header('Location: '. $transaction["url"]); // Go to payment method selection screen
```

About
-----

[](#about)

⭐ Sign up as a merchant at  and start receiving payments in seconds.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~301 days

Total

3

Last Release

1700d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0981f2dac8c1cc68dd8734e6b0d3fe06ad6fc793dd3dd9ad8d669be9208a240?d=identicon)[zaruto](/maintainers/zaruto)

---

Top Contributors

[![sverraest](https://avatars.githubusercontent.com/u/7394603?v=4)](https://github.com/sverraest "sverraest (9 commits)")[![dash8x](https://avatars.githubusercontent.com/u/6671720?v=4)](https://github.com/dash8x "dash8x (1 commits)")[![mohamed-nazim](https://avatars.githubusercontent.com/u/1951897?v=4)](https://github.com/mohamed-nazim "mohamed-nazim (1 commits)")

---

Tags

phpapipayalipaycard-paymentsmaldivesbmlbankofmaldives

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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