PHPackages                             jvandemo/ogone - 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. jvandemo/ogone

ActiveLibrary[Payment Processing](/categories/payments)

jvandemo/ogone
==============

v2.1.0(12y ago)91636[2 issues](https://github.com/jvandemo/Ogone/issues)PHPPHP &gt;=5.3.3

Since Sep 29Pushed 11y ago3 watchersCompare

[ Source](https://github.com/jvandemo/Ogone)[ Packagist](https://packagist.org/packages/jvandemo/ogone)[ RSS](/packages/jvandemo-ogone/feed)WikiDiscussions master Synced 2w ago

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

ATTENTION
=========

[](#attention)

This project is looking for a motivated maintainer.

If you are interested, please contact me: [@jvandemo](http://twitter.com/jvandemo).

Meanwhile take a look at .

Ogone classes for PHP
=====================

[](#ogone-classes-for-php)

PHP classes for working with the Ogone payment system allow you to easily create Ogone payment forms and handle Ogone responses in an efficient and flexible way.

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

[](#requirements)

The classes are only supported on PHP 5 and up.

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

[](#installation)

The easiest way to install this library is by using composer.

Add the following dependency to your `composer.json` file:

```
{
    "require": {
        "jvandemo/ogone": "2.0.*"
    }
}

```

How to use the classes
----------------------

[](#how-to-use-the-classes)

The first step is to create a form to initiate a payment:

```
use Jvandemo\Ogone\Form;

// Define form options
// See Ogone_Form for list of supported options
$options = array(
    'sha1InPassPhrase' => 'your_sha1_in_password',
    'formAction'       => Form::OGONE_TEST_URL,
);

// Define form parameters (see Ogone documentation for list)
// Default parameter values can be set in Ogone_Form if required
$params = array(
    'PSPID' => 'your_ogone_pspid',
    'orderID' => 'your_order_id',
    'amount' => 100,
    'currency' => 'EUR',
    'language' => 'en',
    'CN' => 'name of your client',
    'EMAIL' => 'email of your client',
    'accepturl' => 'where_to_go_if_accepted.html',
    'declineurl' => 'where_to_go_if_declined.html',
    'exceptionurl' => 'where_to_go_if_exception_occurs.html',
    'cancelurl' => 'where_to_go_if_cancelled.html',
);

// Instantiate form
$form = new Form($options, $params);

// You can also add parameters after instantiation
// with the addParam() method
$form->addParam('CN', 'Jurgen Van de Moere')
     ->addParam('EMAIL', 'email@email.com')
     ->addParam('language', 'en');

// Automatically generate HTML form with all params and SHA1Sign
echo $form->render();

```

The second step is to create a script that handles the response by Ogone:

```
use Jvandemo\Ogone\Response;

// Define response options
// See Ogone_Response for list of supported options
$options = array(
    'sha1OutPassPhrase' => 'your_sha1_out_password'
);

// Define array of values returned by Ogone
// Parameters are validated and filtered automatically
// so it is safe to specify a superglobal variable
// like $_POST or $_GET if you don't want to
// specify all parameters manually
$params = $_POST;

// Instantiate response
$response = new Response($options, $params);

// Check if response by Ogone is valid
// The SHA1Sign is calculated automatically and
// verified with the SHA1Sign provided by Ogone
if(! $response->isValid()) {
    // Reponse is not valid so handle accordingly
    exit('The response is not valid');
}

// Use the dump() method to dump the whole response
// if you need to investigate the response when debugging
$response->dump();

// Use the getParam() method to retrieve
// parameters returned by Ogone
$creditCard = $response->getParam('CreditCard');
$amount = $response->getParam('amount');

// Handle further processing of your website
// such as saving payment details to database
// or sending confirmation email to client

// ...

```

This code is also available in the `/examples` directory.

Unit testing
------------

[](#unit-testing)

The tests folder contains basic unit tests plus an additional scenario test that actually connects to the Ogone test server with your personal Ogone credentials to check if things are working correctly.

To configure the scenario test with your Ogone details, copy `config/module.config.global.php` to `module.config.local.php` and fill in your Ogone details:

```
return array(
    'jvandemo_ogone' => array(
        'pspid' => 'your_ogone_pspid',
        'sha1_in_pass_phrase' => 'your_sha1_in_password',
        'sha1_out_pass_phrase' => 'your_sha1_out_password'
    )
);

```

The `.gitignore` file is configured to ignore `module.config.local.php` so you don't have to worry about exposing your Ogone details when creating your own public repository.

To actually run the unit test suite, run:

```
grunt

```

Change log
----------

[](#change-log)

### 1.0.0

[](#100)

- Added Ogone\_Form for generating forms to interact with Ogone
- Added Ogone\_Response for handling responses from Ogone

### 2.0.0

[](#200)

- Added composer support
- Introduced namespaces
- Added unit tests
- Fixed some coding standards warnings
- Added grunt support for unit testing and linting
- Added semantic versioning

### 2.1.0

[](#210)

- Added additional unit tests
- Added scenario test
- Added config file support

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Every ~0 days

Total

2

Last Release

4656d ago

### Community

Maintainers

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

---

Top Contributors

[![jvandemo](https://avatars.githubusercontent.com/u/1859381?v=4)](https://github.com/jvandemo "jvandemo (11 commits)")[![rskuipers](https://avatars.githubusercontent.com/u/1918518?v=4)](https://github.com/rskuipers "rskuipers (2 commits)")

### Embed Badge

![Health badge](/badges/jvandemo-ogone/health.svg)

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

###  Alternatives

[buckaroo/magento2

Buckaroo Magento 2 extension

32414.8k7](/packages/buckaroo-magento2)[ipaymu/ipaymu-php-api

iPaymu PHP API Package Library

1653.8k](/packages/ipaymu-ipaymu-php-api)

PHPackages © 2026

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