PHPackages                             intram/php-sdk - 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. intram/php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

intram/php-sdk
==============

Php sdk for intram payment gateway

0272PHP

Since Feb 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/suntechdevs/intram-phpsdk)[ Packagist](https://packagist.org/packages/intram/php-sdk)[ RSS](/packages/intram-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

INTRAM PHP SDK
==============

[](#intram-php-sdk)

The [PHP](https://www.php.net) library for [INTRAM (intram.org)](https://intram.org).

Built on the INTRAM HTTP API (beta).

Installation via composer
-------------------------

[](#installation-via-composer)

```
composer require intram/php-sdk
```

API configuration
-----------------

[](#api-configuration)

Setup intram API keys.

```
$intram = new \Intram\Intram\(
            "5b06f06a0aad7d0163c414926b635ee9cdf41438de0f09d7",
            "pk_9c0410014969f276e8b3685fec7b1b2ab41fc760db29",
            "sk_08bd75f9468b484d8a9f24daddff4638d6513fdcf3f",
            "d8a9f24daddff4638d6513fdcf3f",
            true)
```

Log in to your Intram account, click on Developer, then on API at this level, get the API keys and give them as arguments to the controller. Initialize Intram PayCfa by entering in order: `PUBLIC_KEY`,` PRIVATE_KEY`, `INTRAM_SECRET`,` INTRAM_MARCHAND_KEY`, `MODE`The mode: `true` for live mode and `false` for test mode.

\##Configure your department / company information

###### Setting Store name

[](#setting-store-name)

(required)

```
$intram->setNameStore("Suntech Store");
```

###### Setting Store Logo Url

[](#setting-store-logo-url)

```
$intram->setLogoUrlStore("https://www.suntechshop/logo.png");
```

###### Setting Store Web site

[](#setting-store-web-site)

```
$intram->setWebSiteUrlStore("https://www.suntechshop");
```

###### Setting Store phone

[](#setting-store-phone)

```
$intram->setPhoneStore("97000000");
```

###### Setting Store Postal adress

[](#setting-store-postal-adress)

```
$intram->setPostalAdressStore("BP 35");
```

\##Create a request paiement In order to allow the user to make a payment on your store, you must create the transaction and then send them the payment url or the qr code to scan. For that :

###### Add Invoice Items

[](#add-invoice-items)

Add the different products of the purchase (required)

```
$intram->setItems([
            ['name'=>"T-shirt",'qte'=>"2",'price'=>"500",'totalamount'=>"1000"],
            ['name'=>"trouser",'qte'=>"1",'price'=>"12500",'totalamount'=>"12500"],
        ]);
```

###### Setting TVA Amount

[](#setting-tva-amount)

TVA (optional)

```
$intram->setTva([["name" => "VAT (18%)", "amount" => 1000],["name" => " other VAT", "amount" => 500]]);
```

###### Adding Custom Data

[](#adding-custom-data)

(optional)

```
$intram->setCustomData([['CartID',"32393"],['PERIOD',"TABASKI"]]);
```

###### Setting Total Amount

[](#setting-total-amount)

Order total (required)

```
$intram->setAmount(13600);
```

###### Setting Currency

[](#setting-currency)

Currency of paiement (required)

```
$intram->setCurrency("XOF");
```

###### Setting Description

[](#setting-description)

Description of operation (required)

```
$intram->setDescription("Pretty and suitable for your waterfall");
```

###### Setting Template

[](#setting-template)

(required)

```
$intram->setTemplate("default");
```

###### Setting Store Redirection Url

[](#setting-store-redirection-url)

```
$intram->setRedirectionUrl("https://www.suntechshop/redirection-url");
```

###### Setting Store Return Url

[](#setting-store-return-url)

```
$intram->setReturnUrl("https://www.suntechshop/return-url");
```

###### Setting Store Cancel Url

[](#setting-store-cancel-url)

```
$intram->setCancelUrl("https://www.suntechshop/cancel-url");
```

###### Make the payment request

[](#make-the-payment-request)

```
$response = json_decode($intram->setRequestPayment());
```

###### Expected response

[](#expected-response)

```
{
              +"status": "PENDING"
              +"transaction_id": "5f2d7a96b97d9d3fea912c11"
              +"receipt_url": "localhost:3000/payment/gate/5f2d7a96b97d9d3fea912c11"
              +"total_amount": 1000
              +"message": "Transaction created successfully"
              +"error": false
}
```

###### Get data

[](#get-data)

```
$transaction_id = $response->transaction_id;
$status = $response->status;
$receipt_url = $response->receipt_url;
$total_amount = $response->total_amount;
$message = $response->message;
$error = $response->error;
```

\##Get transaction status

Give the transaction identifier as an argument to the function (required)

```
$intram->getTransactionStatus(5f2d7a96b97d9d3fea912c11);
```

###### Expected response

[](#expected-response-1)

```
{
  +"error": false
  +"status": "PENDING"
  +"transaction": {
    +"_status": "PENDING"
    +"_channels": []
    +"_created_at": "2020-09-15T14:56:10.316Z"
    +"_id": "5f60d7a0573bc71854bf095e"
    +"_type": "DEBIT"
    +"_store": {
      +"name": "Sodjinnin Store"
      +"postal_adress": "BP 35"
      +"logo_url": "https://www.google.com/webhp?hl=fr&sa=X&ved=0ahUKEwi7kZ3Qpt_qAhWxC2MBHVFZDDgQPAgH"
      +"web_site_url": "https://www.random.org/"
      +"phone": "94784784"
      +"template": "default"
    }
    +"_reference": "SaCsEhzMFc"
    +"_amount": 1000
    +"_country_code": "BJ"
    +"_qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAAB0CAYAAABUmhYnAAAAAklEQVR4AewaftIAAAL9SURBVO3BQQ7jCAhFwZcvi6NyKI7KgkyWrCxZdtLdDFWv9wdrDLFGEWsUsUYRaxSxRhFrFL ▶"
    +"__v": 0
    +"invoice": {
      +"custom_datas": []
      +"_created_at": "2020-09-15T14:56:10.335Z"
      +"_id": "5f60d7a0573bc71854bf095f"
      +"currency": "XOF"
      +"items": array:1 [
        0 => {
          +"_id": "5f60d7a0573bc71854bf0960"
          +"name": "short"
          +"price": 500
        }
      ]
      +"taxes": array:1 [
        0 => {
          +"_id": "5f60d7a0573bc71854bf0961"
          +"name": "tva"
          +"amount": 100
        }
      ]
      +"amount": 1000
      +"description": "At vero eos et accusam et justo duo dolores"
      +"transaction": "5f60d7a0573bc71854bf095e"
      +"__v": 0
    }
  }
  +"message": "statut de la transaction"
}
```

Running Tests
=============

[](#running-tests)

To run tests just setup the API configuration environment variables. An internet connection is required for some of the tests to pass.

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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/1f62d2fed7b73b857200385474d2db3e824e38f3d5567502ecd033b52f42ac5b?d=identicon)[suntechdevs](/maintainers/suntechdevs)

---

Top Contributors

[![suntechdevs](https://avatars.githubusercontent.com/u/68551683?v=4)](https://github.com/suntechdevs "suntechdevs (35 commits)")[![Sodjinnin](https://avatars.githubusercontent.com/u/38305512?v=4)](https://github.com/Sodjinnin "Sodjinnin (7 commits)")

### Embed Badge

![Health badge](/badges/intram-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/intram-php-sdk/health.svg)](https://phpackages.com/packages/intram-php-sdk)
```

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