PHPackages                             knightar/omnipay-mojopay - 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. knightar/omnipay-mojopay

ActiveLibrary[Payment Processing](/categories/payments)

knightar/omnipay-mojopay
========================

Mojopay driver for the Omnipay PHP payment processing library

05.2k1[1 issues](https://github.com/KnightAR/omnipay-mojopay/issues)PHP

Since Jun 15Pushed 9y ago2 watchersCompare

[ Source](https://github.com/KnightAR/omnipay-mojopay)[ Packagist](https://packagist.org/packages/knightar/omnipay-mojopay)[ RSS](/packages/knightar-omnipay-mojopay/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: Mojopay
================

[](#omnipay-mojopay)

**Mojopay gateway for the Omnipay PHP payment processing library**

[![Latest Stable Version](https://camo.githubusercontent.com/27ecd3dcb3fc3154f62865acbd0a462579de6a4e1e92c4e614496d2eec82b1d6/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6967687461722f6f6d6e697061792d6d6f6a6f7061792f762f737461626c65)](https://packagist.org/packages/knightar/omnipay-mojopay)[![Latest Unstable Version](https://camo.githubusercontent.com/e44eb6d7bc35dca9ca2655314f75018857a1dfd7f7d53dbc9785ae3e179de2e3/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6967687461722f6f6d6e697061792d6d6f6a6f7061792f762f756e737461626c65)](https://packagist.org/packages/knightar/omnipay-mojopay)[![License](https://camo.githubusercontent.com/41d2dc424b91a81cf856b72110642c1058a84ec18d13b87d27be2f0e8445ccb1/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6967687461722f6f6d6e697061792d6d6f6a6f7061792f6c6963656e7365)](https://packagist.org/packages/knightar/omnipay-mojopay)[![Build Status](https://camo.githubusercontent.com/52d005055d99665e88b0c546f2bcb0f804aaf07e056a7cfbbe122cb6d11f8bb5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4b6e6967687441522f6f6d6e697061792d6d6f6a6f7061792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/KnightAR/omnipay-mojopay)[![Total Downloads](https://camo.githubusercontent.com/83c1ca2a6ff37cafe77b5e297e61c683559d18dd6f8a3c94bc48c058a1adc5b7/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6967687461722f6f6d6e697061792d6d6f6a6f7061792f646f776e6c6f616473)](https://packagist.org/packages/knightar/omnipay-mojopay)

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

Install
-------

[](#install)

Via Composer

```
$ composer require knightar/omnipay-mojopay
```

Usage
-----

[](#usage)

The following gateways are provided by this package:

- Mojopay

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

This driver supports following transaction types:

- authorize($options) - authorize an amount on the customer's card
- capture($options) - capture an amount you have previously authorized
- purchase($options) - authorize and immediately capture an amount on the customer's card
- refund($options) - refund an already processed transaction
- void($options) - generally can only be called up to 24 hours after submitting a transaction

Gateway instantiation:

```
    $gateway = Omnipay::create('Mojopay');
    $gateway->setProcessorId('abcdefg1234567');
    $gateway->setToken('6ef44f261a4a1595cd377d3ca7b57b92');
    $gateway->setTestMode(true);
```

Driver also supports paying using store cards in the customer vault using `cardReference` instead of `card`, use the vault functions with the `cardReference` parameter.

This driver also supports storing customer data in Mojopay's customer vault:

- createCard($options) - Create a entry in the customer vault
- updateCard($options) - Update an entry in the customer vault
- deleteCard($options) - Delete an entry in a customer vault

```
    $formData = array('number' => '4242424242424242', 'expiryMonth' => '8', 'expiryYear' => '2017', 'cvv' => '123');

    $response = $gateway->createCard([
        'card'          => $formData
    ])->send();

    $cardReference = $response->getCardReference();
```

- listCards - Listing customer vault records by criteria

```
    # Each criteria are optional, no criteria will return no records
    $response = $gateway->listCards([
        'cardReference' => '', # The hash to identify the customer in the vault
        'firstName'     => '', # Portion of cardholder's first name.
        'lastName'      => '', # Portion of cardholder's last name.
        'email'         => '', # Portion of billing email address.
        'last4cc'       => ''  # Last 4 digits of credit card number.
    ]);
    $response_rows = $response->getResponse();
```

`cardReference` can be used in the authorize, purchase, and refund requests:

```
    $gateway->purchase([
        'amount'        => '10.00',
        'cardReference' => '1234567890'
    ]);
```

This driver also supports subscription management which can be accessed using:

- subscription\_add($options) - Add a subscription
- subscription\_delete($options) - Delete a subscription

```
    # As an example we will add a subscription the starts on 01/04/2017
    $gateway->subscription_add([
        'cardReference'          => '1234567890',
        'planId'                 => '1234567890',
        'subscriptionStartDay'   => '01',
        'subscriptionStartMonth' => '04',
        'subscriptionStartYear'  => '2017'
    ]);
```

API Calls on the TODO list which will be implemented eventually:

- Adding, updating, removing, listing Recurring Plans
- Listing subscriptions by customer
- Add a Customer to the Vault while Initiating a Sale/Authorization/Credit/Validate Transaction

We currently have no plans to implement the following calls (Pull requests are accepted for those who wants to add them):

- Adding a custom subscription - Does not return necessary subscription ID to cancel
- Adding a customer and subscription - Does not return necessary subscription ID to cancel

Note: Credit API call is implemented but is not enabled by default on merchant accounts, contact Mojopay if you need this functionality. Please note that this code is untested.

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/knightar/omnipay-mojopay/issues), or better yet, fork the library and submit a pull request.

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

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [John Jablonski](https://github.com/jan-j)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/1ecad68dc1fb0d5a823a80316f89aa06a348ea9e822cc5bf1af06b00c8e86001?d=identicon)[knightar](/maintainers/knightar)

---

Top Contributors

[![KnightAR](https://avatars.githubusercontent.com/u/195225?v=4)](https://github.com/KnightAR "KnightAR (65 commits)")

### Embed Badge

![Health badge](/badges/knightar-omnipay-mojopay/health.svg)

```
[![Health](https://phpackages.com/badges/knightar-omnipay-mojopay/health.svg)](https://phpackages.com/packages/knightar-omnipay-mojopay)
```

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18579.5k1](/packages/omnipay-coinbase)

PHPackages © 2026

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