PHPackages                             jrodella/payment-form-api - 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. jrodella/payment-form-api

ActiveLibrary[API Development](/categories/api)

jrodella/payment-form-api
=========================

Common API to make Lyra payment platform integration easier in PHP based websites.

3.0.0(8y ago)017GPL-3.0+PHPPHP &gt;=5.3.0

Since May 11Pushed 7y agoCompare

[ Source](https://github.com/jrodella/payment-form-api)[ Packagist](https://packagist.org/packages/jrodella/payment-form-api)[ RSS](/packages/jrodella-payment-form-api/feed)WikiDiscussions develop Synced yesterday

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

Lyra payment form API
=====================

[](#lyra-payment-form-api)

Lyra payment form API is an open source PHP SDK that allows integration of secured payment gateway developped by [Lyra Network](https://www.lyra-network.com/) inside e-commerce websites.

Requirements
------------

[](#requirements)

PHP 5.3.0 and later.

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

[](#installation)

### Composer

[](#composer)

You can install the API via [Composer](http://getcomposer.org/). Run the following command:

```
composer require lyranetwork/payment-form-api
```

To use the API, use Composer's [autoload](https://getcomposer.org/doc/00-intro.md#autoloading):

```
require_once('vendor/autoload.php');
```

### Manual Installation

[](#manual-installation)

If you do not wish to use Composer, you can download the [latest release](https://github.com/lyra/payment-form-api/releases). Then, to use the API, include the `init.php` file.

```
require_once('/path/to/payment-form-api/init.php');
```

Usage
-----

[](#usage)

To create payment form do :

```
$ctxMode = 'TEST';
$keyTest = '1111111111111111';
$keyProd = '2222222222222222';
$algo = 'SHA-1';

$request = new \Lyranetwork\Request();
$request->set('ctx_mode', $ctxMode);
$request->set('key_test', $keyTest);
$request->set('key_prod', $keyProd);
$request->set('sign_algo', $algo);

$request->set('site_id', '12345678');
$request->set('amount', '100'); // amount in cents
$request->set('currency', '978');
$request->set('capture_delay', '');
$request->set('validation_mode', '');

echo $request->getRequestHtmlForm(); // display generated payment form
```

To process payment result, do :

```
$keyTest = '1111111111111111';
$keyProd = '2222222222222222';
$algo = 'SHA-1';

$response = new \LyraNetwork\Response($_REQUEST, $keyTest, $keyProd, $algo);

if (! $response->isAuthentified()) {
    // Unauthenticated response received
    die('An error occurred while computing the signature.');
}

$order = get_my_order($response->get('order_id'));

if ($response->isAcceptedPayment()) {
    // update order status, reduce products stock, send customer notifications, ...
    update_my_order($order, 'success');

    // redirect to success page
} elseif ($response->isCancelledPayment()) {
    // redirect to cart page to allow re-order
} else {
     // failed payment logic here
     update_my_order($order, 'failed');

    // redirect to failure or cart page
}
```

License
-------

[](#license)

Each Lyra payment form API source file included in this distribution is licensed under GNU GENERAL PUBLIC LICENSE (GPL 3.0).

Please see LICENSE file for the full text of the GPL 3.0 license. It is also available through the world-wide-web at this URL: .

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2924d ago

### Community

Maintainers

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

---

Top Contributors

[![nabil-semaoune-lyra](https://avatars.githubusercontent.com/u/244469839?v=4)](https://github.com/nabil-semaoune-lyra "nabil-semaoune-lyra (31 commits)")[![jrodella](https://avatars.githubusercontent.com/u/22198227?v=4)](https://github.com/jrodella "jrodella (1 commits)")

---

Tags

phpapisdkpaymente-commercelyra

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jrodella-payment-form-api/health.svg)

```
[![Health](https://phpackages.com/badges/jrodella-payment-form-api/health.svg)](https://phpackages.com/packages/jrodella-payment-form-api)
```

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[postfinancecheckout/sdk

PostFinance Checkout SDK for PHP

22219.1k14](/packages/postfinancecheckout-sdk)[wallee/sdk

wallee SDK for PHP

12354.2k11](/packages/wallee-sdk)

PHPackages © 2026

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