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(5mo ago)01MITPHPPHP ^8.2

Since Jan 6Pushed 5mo 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 today

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

33

—

LowBetter than 72% of packages

Maintenance69

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

178d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62902287?v=4)[Vladimir Malits](/maintainers/vmalits)[@vmalits](https://github.com/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)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[shetabit/multipay

PHP Payment Gateway Integration Package

293361.0k4](/packages/shetabit-multipay)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42361.9k4](/packages/bitpay-sdk)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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