PHPackages                             dofinity/pelecard - 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. dofinity/pelecard

ActiveLibrary[Payment Processing](/categories/payments)

dofinity/pelecard
=================

PHP Library for integrating Pelecard based payments.

12.2k3[2 issues](https://github.com/dofinity/pelecard/issues)[1 PRs](https://github.com/dofinity/pelecard/pulls)PHP

Since Feb 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/dofinity/pelecard)[ Packagist](https://packagist.org/packages/dofinity/pelecard)[ RSS](/packages/dofinity-pelecard/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Maintainability](https://camo.githubusercontent.com/e322596892ff64584354375c531b136bf9831477e95ceccdcd21982971478683/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61313239663763353964386563363431616637392f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/dofinity/pelecard/maintainability)

pelecard
========

[](#pelecard)

A lightweight PHP Helper Library for integrating Pelecard Iframe V2 payments.

Installation with Composer
--------------------------

[](#installation-with-composer)

```
$ composer require dofinity/pelecard:dev-master
```

Basic usage
-----------

[](#basic-usage)

### Payment page setup

[](#payment-page-setup)

```
require __DIR__ . '/vendor/autoload.php';

// change terminal, user and password to real credentials
$terminal = '0123456';
$user = 'user';
$password = 'password';

// change to your own callback url
$GoodURL = 'http://yourdomain/callback.php';
$Total = 100;

// PaymentRequest accepts a lot of params, but in this case we use only required ones
$PaymentRequest = new \Pelecard\PaymentRequest(
    $terminal, $user, $password, $GoodURL, $Total
);

$payment = new \Pelecard\PelecardPayment();
$payment->setPaymentRequest($PaymentRequest);
$result = $payment->SubmitPaymentRequest();
$resultJson = json_decode($result, true);

$URL = $resultJson['URL'];
$ConfirmationKey = $resultJson['ConfirmationKey'];
$Error = $resultJson['Error'];

// redirect to payment page
header("Location: {$URL}");
```

### Payment validation

[](#payment-validation)

```
// callback.php
require __DIR__ . '/vendor/autoload.php';

$PelecardTransactionId = $_GET['PelecardTransactionId'];
$PelecardStatusCode = $_GET['PelecardStatusCode'];
$ConfirmationKey = $_GET['ConfirmationKey'];
$Total = 100;

$PaymentResponse = new \Pelecard\PaymentResponse(
    $PelecardStatusCode, $PelecardTransactionId, '', '', $ConfirmationKey, 100
);

$payment = new \Pelecard\PelecardPayment();
$payment->setPaymentResponse($PaymentResponse);

if ($payment->ValidatePayment()) {
    echo 'Ok. Payment has been verified';
} else {
    echo 'Fail. Payment forged';
}
```

### Retrieve Transaction info

[](#retrieve-transaction-info)

```
// callback.php
require __DIR__ . '/vendor/autoload.php';

// change terminal, user and password to real credentials
$terminal = '0123456';
$user = 'user';
$password = 'password';

$PelecardTransactionId = $_GET['PelecardTransactionId'];

$transaction = new \Pelecard\PelecardTransaction(
    $terminal, $user, $password, $PelecardTransactionId
);

// use properties from src/Pelecard/PelecardTransaction.php class
var_dump($transaction);
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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/5a37de1eec762df3ab902fd0fe6491f3c2add32ae01828978a29d5dbcf93e620?d=identicon)[Dofinity](/maintainers/Dofinity)

---

Top Contributors

[![reissr](https://avatars.githubusercontent.com/u/6906341?v=4)](https://github.com/reissr "reissr (15 commits)")[![ybelenko](https://avatars.githubusercontent.com/u/5541023?v=4)](https://github.com/ybelenko "ybelenko (14 commits)")[![dofinity](https://avatars.githubusercontent.com/u/1629714?v=4)](https://github.com/dofinity "dofinity (2 commits)")[![eyaldofinity](https://avatars.githubusercontent.com/u/8960637?v=4)](https://github.com/eyaldofinity "eyaldofinity (1 commits)")

### Embed Badge

![Health badge](/badges/dofinity-pelecard/health.svg)

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

###  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)
