PHPackages                             mantraideas/laravel-connectips - 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. mantraideas/laravel-connectips

ActiveLibrary[Payment Processing](/categories/payments)

mantraideas/laravel-connectips
==============================

Laravel Connectips Payment Gateway Integration

0.0.2(1y ago)1181MITPHP

Since Apr 15Pushed 1y agoCompare

[ Source](https://github.com/MantraIdeas/LaravelConnectips)[ Packagist](https://packagist.org/packages/mantraideas/laravel-connectips)[ RSS](/packages/mantraideas-laravel-connectips/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

[![Laravel Connectips](https://camo.githubusercontent.com/2e60552150c00d48fd5909f61c6e32c99d1bab4e21eff15b8088d1c005c6621a/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230436f6e6e6563746970732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d616e74726169646561732532466c61726176656c2d636f6e6e656374697073267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d496e746567726174652b436f6e6e6563746970732b636865636b6f75742b746f2b796f75722b4c61726176656c2b6170706c69636174696f6e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/2e60552150c00d48fd5909f61c6e32c99d1bab4e21eff15b8088d1c005c6621a/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230436f6e6e6563746970732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d616e74726169646561732532466c61726176656c2d636f6e6e656374697073267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d496e746567726174652b436f6e6e6563746970732b636865636b6f75742b746f2b796f75722b4c61726176656c2b6170706c69636174696f6e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Laravel Connectips
==================

[](#laravel-connectips)

[![Latest Stable Version](https://camo.githubusercontent.com/d46aa7fde276e2be3dd2ba83940c3bc50f438088b1e8ab31b0879cd01d32c944/687474703a2f2f706f7365722e707567782e6f72672f6d616e74726169646561732f6c61726176656c2d636f6e6e6563746970732f76)](https://packagist.org/packages/mantraideas/laravel-connectips)[![Total Downloads](https://camo.githubusercontent.com/31c5e9022d8ee5868ac2efaa43bcc9fb88127d1310fc06f401d18b93ee193669/687474703a2f2f706f7365722e707567782e6f72672f6d616e74726169646561732f6c61726176656c2d636f6e6e6563746970732f646f776e6c6f616473)](https://packagist.org/packages/mantraideas/laravel-connectips)[![License](https://camo.githubusercontent.com/da9d4c9a3877c632ad2362acd2b5c610782d43a206bec7d9c7d68b099171c3c8/687474703a2f2f706f7365722e707567782e6f72672f6d616e74726169646561732f6c61726176656c2d636f6e6e6563746970732f6c6963656e7365)](https://packagist.org/packages/mantraideas/laravel-connectips)

The `mantraideas/laravel-connectips` allows you to integrate ConnectIps payment on your Laravel Application.

Quick Start
-----------

[](#quick-start)

### Install Using Composer

[](#install-using-composer)

```
composer require mantraideas/laravel-connectips
```

### Publish Config File

[](#publish-config-file)

```
php artisan vendor:publish --provider="MantraIdeas\LaravelConnectips\LaravelConnectipsServiceProvider"
```

This will create a `config/connectips.php` file in your Laravel application. If you want to change the default configuration, you can do so in this file.

### Set Environment Variables

[](#set-environment-variables)

You can set the environment variables in your `.env` file:

```
CONNECTIPS_MERCHANT_ID=""
CONNECTIPS_APP_ID=""
CONNECTIPS_PASSWORD=""
CONNECTIPS_APP_NAME=""
CONNECTIPS_SUCCESS_URL=${APP_URL}/connectips/success/
CONNECTIPS_FAILURE_URL=${APP_URL}/connectips/failure
CONNECTIPS_PEM_PATH="app/private/privatekey.pem"
CONNECTIPS_URL="https://uat.connectips.com"
```

Here is the description of each environment variable:

- `CONNECTIPS_MERCHANT_ID`: Your Connectips Merchant ID. (Provided by Connectips)
- `CONNECTIPS_APP_ID`: Your Connectips App ID. (Provided by Connectips)
- `CONNECTIPS_PASSWORD`: Your Connectips Password. (Provided by Connectips)
- `CONNECTIPS_APP_NAME`: Your Connectips App Name. (Provided by Connectips)
- `CONNECTIPS_SUCCESS_URL`: The URL to redirect to after a successful payment.
- `CONNECTIPS_FAILURE_URL`: The URL to redirect to after a failed/canceled payment.
- `CONNECTIPS_PEM_PATH`: The path to the private key file. (File provided by Connectips) **Note: It must be inside `storage` directory.**
- `CONNECTIPS_URL`: The URL to the Connectips API. (Default is `https://uat.connectips.com` for testing.)

### Usage

[](#usage)

```
 $connectips = new \Mantraideas\LaravelConnectips\LaravelConnectips();
 // Create Unique Transaction Id
    $transactionId = uniqid('txn_');
    // Generate Transaction Details
    $transactionDetails = $connectips->generateData(
        transactionId: $transactionId,
        transactionAmount: 5000, // amount in paisa i.e. 5000 paisa = 50.00 NPR
        referenceId: 'REF_' . uniqid(),
        remarks: 'Payment for service',
        particulars: 'Service payment',
        transactionDate: now()->format('d-m-Y'),
        transactionCurrency: 'NPR'
    );
    // Store Payment on Database
    \App\Models\Payment::create(
        [
            'transaction_id' => $transactionId,
            'amount'=>$transactionDetails['TXNAMT'],
            'status'=>'Pending'
        ]
    );
    // Pass Transaction Details to View
    return view('welcome', [
        'connectIpsUrl' => config('connectips.connectIpsUrl').'/connectipswebgw/loginpage',
        'transaction' => $transactionDetails,
        'successUrl' => route('payment.success'),
        'failureUrl' => route('payment.failure')
    ]);
```

### Create Payment Form

[](#create-payment-form)

You can create a payment form using the transaction details generated above. Here is an example of how to create a payment form in your Blade view:

```
>

    Connectips Gateway

    Connect IPS Payment Form

        @foreach($transaction as $key => $value)

            {{ $key }}:

        @endforeach
        Make Payment

```

After this user will be redirected to connectips payment webpage and then after the action user will be redirected to Success or Fail callback url based on the payment status. Then you can use the following code to handle the success and failure callback.

### Validate Payment Status

[](#validate-payment-status)

Additionally, you can validate payment status using the `validatePayment` method. This method will check the payment status and return a boolean value. You will get `transaction_id` from the response of Connectips API to your success and failed payment callback url. You can use the following code to validate the payment status. By using the `transaction_id` you can check your payments table to get amount and use this method.

```
    $connectips = new \Mantraideas\LaravelConnectips\LaravelConnectips();
    $transactionId = request()->query('TXNID'); // Replace with the actual transaction ID
    $transactionAmount = \App\Models\Payment::where('transaction_id',$transactionId)->first()?->amount; // Replace with the actual transaction amount
    $paymentValidation = $connectips->validatePayment($transactionId,$transactionAmount);
```

This will return transaction status as follows.

```
array:7 [▼
  "merchantId" => "Your Merchant Id"
  "appId" => "Your App Id"
  "referenceId" => "txn_67f8a3e7055fa"
  "txnAmt" => "5000" // Amount in paisa i.e. 5000 paisa = 50.00 NPR
  "token" => null
  "status" => "SUCCESS"
  "statusDesc" => "TRANSACTION SUCCESSFUL"
]

```

### Get Transaction Details

[](#get-transaction-details)

You can also get transaction details using the `getTransactionDetails` method. This method will return the transaction details as an array.

```
    $connectips = new \Mantraideas\LaravelConnectips\LaravelConnectips();
    $transactionId = request()->query('TXNID'); // Replace with the actual transaction ID
    $transactionAmount = \App\Models\Payment::where('transaction_id',$transactionId)->first()?->amount; // Replace with the actual transaction amount
    $transactionDetails = $connectips->getTransactionDetails($transactionId);
```

This will return transaction details as follows.

```
array:18 [▼
  "status" => "SUCCESS"
  "statusDesc" => "TRANSACTION SUCCESSFUL"
  "merchantId" => "Your Merchant ID"
  "appId" => "Your App ID"
  "referenceId" => "txn_67f8a3e7055fa" //this is your transaction id
  "txnAmt" => 5000.0 // amount in paisa i.e. 5000 paisa = 50.00 NPR
  "token" => null
  "debitBankCode" => "2501"
  "txnId" => 13303786
  "batchId" => 712974908
  "txnDate" => 1744348150748
  "txnCrncy" => null
  "chargeAmt" => 225.0 // amount in pasia i.e. 225 paisa = 2.25 NPR
  "chargeLiability" => "CG"
  "refId" => "REF_67f8a3e705600"
  "remarks" => "Payment for service"
  "particulars" => "Service payment"
  "creditStatus" => "DEFER"
]

```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

Author
------

[](#author)

- [@Dipesh79](https://www.github.com/Dipesh79)

Support
-------

[](#support)

For support, email [dipeshkhanal79\[at\]gmail\[dot\]com](mailto:dipeshkanal79@gmail.com).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance47

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

392d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63183800?v=4)[Dipesh Khanal](/maintainers/Dipesh79)[@dipesh79](https://github.com/dipesh79)

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

---

Top Contributors

[![dipesh79](https://avatars.githubusercontent.com/u/63183800?v=4)](https://github.com/dipesh79 "dipesh79 (7 commits)")

---

Tags

connectipslaravelpayment

### Embed Badge

![Health badge](/badges/mantraideas-laravel-connectips/health.svg)

```
[![Health](https://phpackages.com/badges/mantraideas-laravel-connectips/health.svg)](https://phpackages.com/packages/mantraideas-laravel-connectips)
```

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