PHPackages                             digitickets/omnipay.datacash - 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. digitickets/omnipay.datacash

ActiveLibrary

digitickets/omnipay.datacash
============================

Custom OmniPay driver for DataCash

v1.0.0(6y ago)041.1k↓41.5%PHP

Since Sep 12Pushed 6y ago2 watchersCompare

[ Source](https://github.com/digitickets/omnipay-datacash-redirect)[ Packagist](https://packagist.org/packages/digitickets/omnipay.datacash)[ Docs](https://gitlab.totallydev.com/digitickets/omnipay.datacash)[ RSS](/packages/digitickets-omnipaydatacash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Omnipay: DataCash
=================

[](#omnipay-datacash)

**DataCash driver for the Omnipay PHP payment library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+.

This package implements only DataCash support for Omnipay 2.x Off-sites, where the customer is redirected to enter payment details

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

[](#installation)

This package is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "digitickets/omnipay.datacash": "^0.*"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- DataCash

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

This is a sample code of standard Off-site controller using the driver.

### Request a payment

[](#request-a-payment)

```
// Gateway setup
$gateway = $this->gatewayFactory('DataCash');

// Pluigns specific parameters
gateway->setMerchantId('00000001');
$gateway->setPassword('PloKoQw2123');
$gateway->setPageId(123);
$gateway->setTestMode(true);

// Create or fetch your product transaction
$transaction = $this->createTransaction($request);

// Get the data ready for the payment
// Please note that even off-site gateways make use of the CreditCard object,
// because often you need to pass customer billing or shipping details through to the gateway.
$cardData = $transaction->asOmniPay;
$itemsBag = $this->requestItemsBag($request);

// Authorize request
$request = $gateway->purchase(array(
    'amount' => $transaction->amount,
    'currency' => $transaction->currency,
    'card' => $cardData,
    'returnUrl' => $this->generateCallbackUrl(
        'DataCash',
        $transaction->id
    ),
    'transactionId' => $transaction->id,
    'description' => $transaction->description,
    'items' => $itemsBag,
));

// Send request
$response = $request->send();

// Process response
$this->processResponse($response);

```

### Process payment result

[](#process-payment-result)

```
// Fetch transaction details
$transaction = Transaction::findOrFail($transactionId);

// Gateway setup
$gateway = $this->gatewayFactory('DataCash');

// Pluigns specific parameters
gateway->setMerchantId('00000001');
$gateway->setPassword('PloKoQw2123');
$gateway->setPageId(123);
$gateway->setTestMode(true);

// Get the data ready to complete the payment. Since this is typically a stateless callback
// we need to first retrieve our original product transaction details
$params = [
    "amount" => $transaction->amount,
    "currency" => $transaction->currency,
    'returnUrl' => $this->generateCallbackUrl(
        'DataCash',
        $transaction->id
    ),
    'transactionId' => $transaction->id,
    'transactionReference' => $transaction->ref,
];

// Complete purchase request
$request = $gateway->completePurchase($params);

// Send request
$response = $request->send();

// Process response
$this->processResponse($response);

```

### DataCash plugin parameters

[](#datacash-plugin-parameters)

In order to use the plugin you must provide the following parameters

```

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Recently: every ~0 days

Total

6

Last Release

2413d ago

Major Versions

v0.0.5 → v1.0.02019-10-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23523887?v=4)[DigiTickets](/maintainers/DigiTickets)[@digitickets](https://github.com/digitickets)

---

Tags

omnipaydatacash

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/digitickets-omnipaydatacash/health.svg)

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

###  Alternatives

[silverstripe/silverstripe-omnipay

SilverStripe Omnipay Payment Module

38106.0k15](/packages/silverstripe-silverstripe-omnipay)

PHPackages © 2026

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