PHPackages                             masterzero/epay - 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. masterzero/epay

ActiveLibrary[Payment Processing](/categories/payments)

masterzero/epay
===============

library for working with ePay payment system via API

01.3kPHP

Since Oct 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/MasterZero/laravel-epay)[ Packagist](https://packagist.org/packages/masterzero/epay)[ RSS](/packages/masterzero-epay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel ePay API
================

[](#laravel-epay-api)

library to work with ePay payment system via API.

Setup:
======

[](#setup)

1. Use following command in your terminal to install this library. (Currently the library is in development mode):

    `composer require masterzero/epay dev-master`
2. Update the poviders in config/app.php

    ```
     'providers' => [
         // ...
         MasterZero\Epay\ApiServiceProvider::class,
     ]

    ```
3. Update the aliases in config/app.php

    ```
     'aliases' => [
         // ...
         'EpayApi' => MasterZero\Epay\Facade\Api::class,
     ]

    ```
4. Create `config/epay.php` with content:

```
return [
    'merchantnumber'=> env('EPAY_MERCHANTNUMBER', '1337'),
    'password'=> env('EPAY_PASSWORD', '12345678'),
];
```

5. Add these params to `.env` (optional):

```
EPAY_MERCHANTNUMBER=1337
EPAY_PASSWORD=12345678
```

Usage:
======

[](#usage)

### capture transaction:

[](#capture-transaction)

capture transaction. Customer money -&gt; your money

```
use EpayApi;
// ...

$optionalParams = [
    'group'     => 'customers',
    'invoice'   => 'for some product',
]

$result = EpayApi::capture($transactionid, $amount /*, $optionalParams*/);

if ($result['captureResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### credit transaction:

[](#credit-transaction)

Credit transaction. Part of captured (your) money -&gt; back to customer money

```
use EpayApi;
// ...

$optionalParams = [
    'group'     => 'customers',
    'invoice'   => 'for some product',
]

$result = EpayApi::credit($transactionid, $amount /*, $optionalParams*/);

if ($result['creditResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### delete transaction:

[](#delete-transaction)

Delete transaction. All of non-captured (not-your) money -&gt; back to customer money

```
use EpayApi;
// ...

$optionalParams = [
    'group'     => 'customers',
]

$result = EpayApi::delete($transactionid /*, $optionalParams*/);

if ($result['deleteResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### authorize:

[](#authorize)

Get money for payment subscription

```
use EpayApi;
// ...

$params = [
    'subscriptionid' => 123,
    'orderid' => 123,
    'amount' => 5000, // 50.00 * 100
    'currency' => 208, // DKK
    'instantcapture' => 1,
    'group' => 'customer', //optional
    'description' => 'la la la', //optional
    'email' => 'test@example.com', //optional
    'sms' => 'la la la', //optional
    'ipaddress' => '255.255.255.255', //optional
]

$result = EpayApi::authorize($params);

if ($result['authorizeResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### delete subscription:

[](#delete-subscription)

Delete subscription and stop authorize.

```
use EpayApi;

// ...

$result = EpayApi::deletesubscription($subscriptionid);

if ($result['deletesubscriptionResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### get epay error:

[](#get-epay-error)

Get epay error description by epayresponsecode

```
use EpayApi;
// ...

/**
 * laguages:
 * 1 - Danish
 * 2 - English
 * 3 - Swedish
 */
$result = EpayApi::getEpayError($language, $epayresponsecode);

if ($result['getEpayErrorResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

### get pbs error:

[](#get-pbs-error)

Get pbs error description by pbsresponsecode

```
use EpayApi;
// ...

/**
 * laguages:
 * 1 - Danish
 * 2 - English
 * 3 - Swedish
 */
$result = EpayApi::getPbsError($language, $pbsresponsecode);

if ($result['getPbsErrorResult']) {
    echo "ba dum tss! the method works!";
} else {
    echo "nope. something went wrong :C";
}
```

multi-merchant usage
====================

[](#multi-merchant-usage)

```
use MasterZero\Epay\Api;

// ...

$api = new Api([
    'merchantnumber' => '1337',
    'password' => '12345678',
]);

$api->authorize($params);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d010d15b3d54f6f22bec4007c087d693b31796ededee6f720b519a5f4bf0004?d=identicon)[MasterZero](/maintainers/MasterZero)

---

Top Contributors

[![MasterZero](https://avatars.githubusercontent.com/u/8591768?v=4)](https://github.com/MasterZero "MasterZero (13 commits)")[![masterzerno-commits](https://avatars.githubusercontent.com/u/236914101?v=4)](https://github.com/masterzerno-commits "masterzerno-commits (1 commits)")

### Embed Badge

![Health badge](/badges/masterzero-epay/health.svg)

```
[![Health](https://phpackages.com/badges/masterzero-epay/health.svg)](https://phpackages.com/packages/masterzero-epay)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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