PHPackages                             vload/merchant-connector - 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. vload/merchant-connector

ActiveLibrary[API Development](/categories/api)

vload/merchant-connector
========================

VLoad API connector for merchants

1.0.1(7y ago)01.8k1PHPPHP &gt;=5.6

Since Aug 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gpndata/vload-merchant-connector)[ Packagist](https://packagist.org/packages/vload/merchant-connector)[ RSS](/packages/vload-merchant-connector/feed)WikiDiscussions master Synced yesterday

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

VLoad API connector for merchants
=================================

[](#vload-api-connector-for-merchants)

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

[](#installation)

```
composer require vload/merchant-connector
```

Usage
-----

[](#usage)

```
MerchantConnector {
    public __construct(\Vload\Common\Api\Config $config)
    public validate(string $pin)
    public charge(string $orderId, string $pin, \Vload\MerchantConnector\VO\Customer $customer [, string $description)
}
```

### Create connector instance

[](#create-connector-instance)

##### Vanilla PHP

[](#vanilla-php)

```
$secret = 'vload_secret_key'; //Merchant secret key provided by VLoad
$config = \Vload\Common\Api\Config::init($secret);
$connector = new MerchantConnector($config);
```

##### Symfony service conatiner

[](#symfony-service-conatiner)

```
# config/services.yaml
services:
    # ...
    vload.config:
        class: Vload\Common\Api\Config
        factory: ['Vload\Common\Api\Config', init]
        arguments: ['Your-VLoad-secret']

    Vload\MerchantConnector\MerchantConnector:
        class: Vload\MerchantConnector\MerchantConnector
        arguments: ["@vload.config"]
```

### Validate voucher

[](#validate-voucher)

```
$pin = '3156391887289068';
$voucher = $connector->validate($pin);
```

#### Parameters

[](#parameters)

##### pin (required)

[](#pin-required)

Vocucher pin

#### Returns

[](#returns)

Method returns \\Vload\\Common\\VO\\Voucher object on success or throws [an exception](#exceptions) on failure.

### Charge voucher

[](#charge-voucher)

```
$orderId = '12345678';
$pin = '3156391887289068';
$customer = new \Vload\Common\VO\Customer(...);
$description = 'Test redeem';
$charge = $connetor->charge($orderId, $pin, $customer, $description);
```

#### Parameters

[](#parameters-1)

##### orderId (required)

[](#orderid-required)

Order reference in your system

##### pin (required)

[](#pin-required-1)

VLoad voucher's pin number

##### customer (required)

[](#customer-required)

Customer object in you system. Check [samples](/samples) for proper customer creation code.

##### description (optional)

[](#description-optional)

Description of the charge

#### Returns

[](#returns-1)

Method returns \\Vload\\Common\\VO\\Charge object on success or throws [an exception](#exceptions) on failure.

### Retrieve charge

[](#retrieve-charge)

```
$chargeId = 'AWT_fCCMh9GTrU2CKeaeXw==';
$charge = $connector->retrieveCharge($chargeId);
```

#### Parameters

[](#parameters-2)

##### chargeId (required)

[](#chargeid-required)

The ID of the charge to be retrieved, as returned from [charge voucher](#charge-voucher).

#### Returns

[](#returns-2)

Method returns \\Vload\\Common\\VO\\Charge object on success or throws [an exception](#exceptions) on failure.

Exceptions
----------

[](#exceptions)

Connector methods will throw following exceptions from \\Vload\\Common\\Exception namespace if requested operations does not succeed at the VLoad API.

#### InvalidInput

[](#invalidinput)

The request was unacceptable, often due to missing a required parameter.

#### NotFound

[](#notfound)

Object you requested does not exist (e.g. invalid or inactive voucher)

#### Unauthorized

[](#unauthorized)

No valid API key provided.

#### Conflict

[](#conflict)

The request conflicts with another request (perhaps due to using the same idempotent key).

#### CommunicationFailed

[](#communicationfailed)

Some internal API error occured.

Samples
-------

[](#samples)

See [samples directory](/samples) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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 ~2 days

Total

2

Last Release

2868d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3986151?v=4)[Andrzej](/maintainers/Burnedo)[@Burnedo](https://github.com/Burnedo)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vload-merchant-connector/health.svg)

```
[![Health](https://phpackages.com/badges/vload-merchant-connector/health.svg)](https://phpackages.com/packages/vload-merchant-connector)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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