PHPackages                             vmalits/bpay-sdk - 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. [Payment Processing](/categories/payments)
4. /
5. vmalits/bpay-sdk

ActiveLibrary[Payment Processing](/categories/payments)

vmalits/bpay-sdk
================

Modern PHP SDK for BPay.md payment gateway

1.0.0(4mo ago)01MITPHPPHP ^8.2

Since Jan 6Pushed 4mo agoCompare

[ Source](https://github.com/vmalits/bpay-sdk)[ Packagist](https://packagist.org/packages/vmalits/bpay-sdk)[ Docs](https://github.com/vmalits/bpay-sdk)[ RSS](/packages/vmalits-bpay-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

BPay.md PHP SDK
===============

[](#bpaymd-php-sdk)

---

### Requirements

[](#requirements)

- PHP **8.2+**
- `json` extension
- `guzzlehttp/guzzle` ^7.8 (installed automatically via Composer)

### Installation

[](#installation)

Via Composer:

```
composer require vmalits/bpay-sdk
```

### Quick start

[](#quick-start)

```
use Malits\BPay\BpayClient;
use Malits\BPay\Builder\InvoiceBuilder;
use Malits\BPay\Enums\Currency;
use Malits\BPay\Enums\Language;
use Malits\BPay\Enums\PaymentMethod;

$client = new BpayClient('merchant_id', 'secret_key');

$invoice = InvoiceBuilder::create()
    ->uuid('your-uuid')
    ->merchantId('merchant_id')
    ->amount(100.0)
    ->orderId('order123')
    ->description('Order payment')
    ->successUrl('https://your-site/success')
    ->failUrl('https://your-site/fail')
    ->callbackUrl('https://your-site/callback')
    ->currency(Currency::MDL)
    ->language(Language::EN)
    ->paymentMethod(PaymentMethod::BPAY)
    ->addParam('customer_name', 'John')
    ->addParam('phone_number', '123456789')
    ->build();

$response = $client->createInvoice($invoice);
// $response->url — payment link
```

### Payment check

[](#payment-check)

```
$result = $client->checkPayment('uuid-payment');
if ($result->isPaid) {
    // Payment successful
}
```

### Callback handling

[](#callback-handling)

```
$callbackDto = $client->handleCallback($_POST);

$uuid = $callbackDto->uuid->value;
$amount = $callbackDto->amount->value;
$currencyCode = $callbackDto->currency->code;
```

### Exceptions

[](#exceptions)

- `BPayException` — base exception
- `ApiException` — API error
- `NetworkException` — network error
- `InvalidSignatureException` — invalid signature
- `ValidationException` — validation error

### Enum / Value Objects

[](#enum--value-objects)

- `Currency` enum — MDL, RUB, USD, RON, EUR
- `Language` enum — RU, RO, EN
- `PaymentMethod` enum — BPAY, CARD\_OMD, CARD\_EUR, CARD\_USD, WEBMONEY\_WMZ, WEBMONEY\_WMR
- `Amount` VO — safe representation of amount
- `Uuid` VO — payment identifier
- `Currency` VO — numeric currency code
- `Params` VO — extra callback parameters

### Tests

[](#tests)

```
composer test
```

### Examples

[](#examples)

See [EXAMPLES.md](EXAMPLES.md) for detailed usage examples of all SDK features.

### License

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance76

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

131d ago

### Community

Maintainers

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

---

Top Contributors

[![vmalits](https://avatars.githubusercontent.com/u/62902287?v=4)](https://github.com/vmalits "vmalits (1 commits)")

---

Tags

sdkpayment processingpaymentgatewayMoldovaMDLbpay

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vmalits-bpay-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/vmalits-bpay-sdk/health.svg)](https://phpackages.com/packages/vmalits-bpay-sdk)
```

PHPackages © 2026

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