PHPackages                             elnurxf/omnipay-instamojo - 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. elnurxf/omnipay-instamojo

ActiveLibrary[Payment Processing](/categories/payments)

elnurxf/omnipay-instamojo
=========================

Instamojo API v1.1 driver for the Omnipay 3.0 PHP payment processing library

02.0kPHP

Since Apr 30Pushed 6y agoCompare

[ Source](https://github.com/elnurxf/omnipay-instamojo)[ Packagist](https://packagist.org/packages/elnurxf/omnipay-instamojo)[ RSS](/packages/elnurxf-omnipay-instamojo/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay 3.0: Instamojo
======================

[](#omnipay-30-instamojo)

**[Instamojo](https://www.instamojo.com/) driver for the Omnipay 3.0 PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements [Instamojo Payments API v1.1](https://docs.instamojo.com/docs/payments-api).

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply run:

```
composer require elnurxf/omnipay-instamojo

```

Purchase
--------

[](#purchase)

```
use Omnipay\Omnipay;

// Setup payment gateway
$gateway = Omnipay::create('Instamojo');
$gateway->setApiKey('abc123');
$gateway->setAuthToken('abc123');

// OR
$gateway->initialize([
    'api_key'    => 'abc123',
    'auth_token' => 'abc123',
    'testMode'   => true,
]);

// Send purchase request
$response = $gateway->purchase(
    [
        'amount'     => '10.00',
        'purpose'    => 'Instamojo Payment',
        'email'      => 'elnurxf@gmail.com',
        'buyer_name' => 'Elnur Akhundov',
        'purpose'    => 'Instamojo Payment',
    ]
)->send();

// Process response
if ($response->isSuccessful() && $response->isRedirect()) {

    // Redirect to offsite payment gateway
    // print_r($response->getData());
    // echo $response->getTransactionStatus();
    $response->redirect();

} else {

    // Request failed
    echo $response->getMessage();
}
```

Complete Purchase
-----------------

[](#complete-purchase)

```
// Send complete purchase request
$response = $gateway->completePurchase(
    [
        'transactionReference' => $_GET['payment_id'],
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Request was successful
    print_r($response->getData());
    echo $response->getTransactionStatus();

} else {

    // Request failed
    echo $response->getMessage();
}
```

Refund
------

[](#refund)

```
// Send refund request
$response = $gateway->refund(
    [
        'transactionReference' => $payment_id,
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Request was successful
    print_r($response->getData());
    echo $response->getTransactionStatus();

} else {

    // Request failed
    echo $response->getMessage();
}
```

Fetch Payment Request
---------------------

[](#fetch-payment-request)

```
// Send fetch payment request
$response = $gateway->fetchPaymentRequest(
    [
        'transactionReference' => $payment_request_id,
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Request was successful
    print_r($response->getData());
    echo $response->getTransactionStatus();

} else {

    // Request failed
    echo $response->getMessage();
}
```

Webhook
-------

[](#webhook)

```
use Omnipay\Omnipay;

// Setup payment gateway
$gateway = Omnipay::create('Instamojo');
$gateway->setSalt('abc123');

// Payment notification request
$response = $gateway->acceptNotification()->send();

// Process response
if ($response->isSuccessful()) {

    // Request was successful
    print_r($response->getData());
    echo $response->getTransactionReference();
    echo $response->getTransactionStatus();

} else {

    // Request failed
    echo $response->getMessage();
}
```

[Instamojo API v1.1 Documentation](https://docs.instamojo.com/docs/payments-api)
--------------------------------------------------------------------------------

[](#instamojo-api-v11-documentation)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fd888a96585948e2da8eac98cdb5aef9ff495b00ec922376ce95051692543b9?d=identicon)[elnurxf](/maintainers/elnurxf)

---

Top Contributors

[![gentor](https://avatars.githubusercontent.com/u/2902504?v=4)](https://github.com/gentor "gentor (11 commits)")[![sankarsuda](https://avatars.githubusercontent.com/u/798414?v=4)](https://github.com/sankarsuda "sankarsuda (3 commits)")

---

Tags

gatewayinstamojoomnipaypayment

### Embed Badge

![Health badge](/badges/elnurxf-omnipay-instamojo/health.svg)

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

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