PHPackages                             mars-iq/iqpay - 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. mars-iq/iqpay

ActiveLibrary[Payment Processing](/categories/payments)

mars-iq/iqpay
=============

Php Api for iraq e-payment 4 providoor QiCard,aps,zaincash,amwal(PayTabs),switch in one class

v1.1(4y ago)4122proprietaryPHPPHP &gt;=5.5

Since Oct 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mars-iq/iq-epay)[ Packagist](https://packagist.org/packages/mars-iq/iqpay)[ Docs](https://github.com/mars-iq/iq-epay)[ RSS](/packages/mars-iq-iqpay/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (2)Used By (0)

 [![](https://camo.githubusercontent.com/5abbc47e63598f350b65407fca556a9e757115f1521b5ad6a16a99ece3de2888/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f6d6172732e706e67)](https://camo.githubusercontent.com/5abbc47e63598f350b65407fca556a9e757115f1521b5ad6a16a99ece3de2888/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f6d6172732e706e67) [![](https://camo.githubusercontent.com/72e6107637a6d4cb406d71f0f180c11f389b5b9e6d78b4dc83157c3e30f6b07a/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f79616e6861642e706e67)](https://camo.githubusercontent.com/72e6107637a6d4cb406d71f0f180c11f389b5b9e6d78b4dc83157c3e30f6b07a/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f79616e6861642e706e67) [![](https://camo.githubusercontent.com/0d41ef19c489411821420fd3904805fea0859b3d2eb5a081cf77d44cd46a15ce/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f73746174696f6e2e6a7067)](https://camo.githubusercontent.com/0d41ef19c489411821420fd3904805fea0859b3d2eb5a081cf77d44cd46a15ce/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f73746174696f6e2e6a7067) [![](https://camo.githubusercontent.com/eb9170b4fd70e2f05bd82078c37a0ab5251e3b5c1cc72358c51126e09d0f4830/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f71692e706e67)](https://camo.githubusercontent.com/eb9170b4fd70e2f05bd82078c37a0ab5251e3b5c1cc72358c51126e09d0f4830/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f71692e706e67) [![](https://camo.githubusercontent.com/8518edff6e3ac6ea16bd2181267dbbc88f17843065dde5058b55c8049eef4b59/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f616d77616c2e6a7067)](https://camo.githubusercontent.com/8518edff6e3ac6ea16bd2181267dbbc88f17843065dde5058b55c8049eef4b59/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f616d77616c2e6a7067) [![](https://camo.githubusercontent.com/0e85e03bf247d72287c167dc97581e9ddfb394d6b4258334a15c2895275f495f/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f7a61696e636173682e706e67)](https://camo.githubusercontent.com/0e85e03bf247d72287c167dc97581e9ddfb394d6b4258334a15c2895275f495f/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f7a61696e636173682e706e67) [![](https://camo.githubusercontent.com/be6bf8df0abee466f9dc7830b3be250b772c96340ab35318d7fef43b6f26bc03/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f6170732e706e67)](https://camo.githubusercontent.com/be6bf8df0abee466f9dc7830b3be250b772c96340ab35318d7fef43b6f26bc03/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f6170732e706e67) [![](https://camo.githubusercontent.com/d0926d2730fb8d40b8473fb460a74f7fd40959b7d9cb742f59185b9b5a2f2a2c/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f7377697463682e6a7067)](https://camo.githubusercontent.com/d0926d2730fb8d40b8473fb460a74f7fd40959b7d9cb742f59185b9b5a2f2a2c/68747470733a2f2f6d6f68616d6d6564616b65656c2e6f6e6c696e652f6c6f676f732f7377697463682e6a7067)

MarTeam/iq-epay:
----------------

[](#marteamiq-epay)

This peace of code was written using hackathon yanhad, and it is now under testing level

USES:
-----

[](#uses)

PHP OOP , Curl,Php HttpClint,JWT

Problem:
--------

[](#problem)

Most of the applications today come with e-payment tools, where many challenges occur in terms of coding. On top of them, the variety of payment gateways which might be difficult to be implemented in the context of coding, and this is due to the multiplicity of documents, links, and work behavior

Target:
-------

[](#target)

To provide a particular package aiming to overcome the challenges of e-payment, throughout building a single object and then call a unit function along with its parameters in order to achieve a payment process all over the gates

Payment Gates:

```
1-APS (Validated)
2-QiCard (Validated)
3-Amwal(PayTabs) (Validated)
4-ZainCash (Validated)
5-Switch (Validated)
6-Tasdid (Beta)
```

Solution:
---------

[](#solution)

Building a set of problem-solving objects that work together to implemented e-payment task in each particular gateway successfully

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

[](#installation)

Use composer to manage your dependencies and download mars-iq/iqpay (Work Just Composer Version 2):

```
composer require mars-iq/iqpay:dev-master

```

Installation Config File
------------------------

[](#installation-config-file)

now you should add config.json file in your root of project like this (All this Configs It is provided to you by the source)

```
{
    "aps": {
        "username": "xxxxxxxxxx",
        "password": "xxxxxxxxxx",
        "urlapi": "http://api.example.com",
        "redirect": true
    },
    "qi": {

        "serverkey": "xxxxxxxxxx",
          "urlapi": "http://api.example.com"
    },
    "zaincash": {
        "Msisdn": "xxxxxxxxxx",
        "Merchant_Id": "xxxxxxxxxx",
        "Secret": "xxxxxxxxxx",
        "production_cred": false
    },
    "switch": {
        "tokenSwitch": "xxxxxxxxxx",
        "entityId": "xxxxxxxxxx",
        "urlapi": "http://api.example.com"

    },
    "tasdid": {
        "username": "xxxxxxxxxx",
        "password": "xxxxxxxxxx",
        "serviceId": "xxxxxxxxxx",
        "urlapi": "http://api.example.com"

    },
    "amwal": {
        "serverkey": "xxxxxxxxxx",
        "profileid": "xxxxxxxxxx",
        "urlapi": "http://api.example.com"

    }

}
```

Using Object
------------

[](#using-object)

```
      use \iqpay\PayClass;
      use \iqpay\getWays;
```

Example
-------

[](#example)

```

     $PayClass = new PayClass();
     $PayClass->amount = "10000";
     $PayClass->currency = "IQD";// or USD
     $PayClass->returnUrl = "http://example.com";
     $PayClass->failUrl = "http://example.com";
     $PayClass->language = "ar";// or "en"
     $PayClass->description = "xxxxxxx";
     $PayClass->ordernum = "xxxxxxx";
     $PayClass->nameCostumer = "xxxxxxx";
     $PayClass->phoneCostumer = "xxxxxxx";
     $PayClass->method =getWays::qi; //  or "getWays::qi" or "getWays::zaincash" or "getWays::aps"   or "getWays::amwal"
     $response=$PayClass->Pay();//to procces Pay  - response (transiction_id,url) status=>1 is succes or status=> 0 if have erorr and response=>xxxx
     //array(transiction_id,url)  url use for redirect to the payment getway examlpe: header('location: http://paygate.com')
     //transiction_id to save in your database
```

Example Switch MasterCard
-------------------------

[](#example-switch-mastercard)

```
    $PayClass = new PayClass();
    $PayClass->method=getWays::switch;
    $PayClass->amount="90";
    $PayClass->cardNumber="xxxxxxxxxxxxxxx";
    $PayClass->cardHolder="xxxxxxxxxxxxxxx";
    $PayClass->currency="IQD"; // or USD
    $PayClass->Mounth="xxx";
    $PayClass->Year="xxx";
    $PayClass->Cvv="xxx";

    $response=$PayClass->PaySwitch();//to procces Pay  - response (transiction_id) and status=>1 success or status=>0 if have erorr
    //transiction_id to save in your database
```

Example Check Procces Success(APS,QiCard)
-----------------------------------------

[](#example-check-procces-successapsqicard)

```
   $orderId = "xxxxxxxxxxxxxxxxxxxx";
   $transiction_id = "xxxxxxxxxxxxxxxxxxxx";
   $PayClass = new PayClass();
   $PayClass->method = getWays::aps;// or getWays::qi
   $res = $PayClass->checkOrder($orderId,$transiction_id); // return -1 not supported  or 'status'=> 1 succes or 'status'=> 2 error and response
```

Example Void Order (QiCard)
---------------------------

[](#example-void-order-qicard)

```
   $orderId = "xxxxxxxxxxxxxxxxxxxx";
   $transiction_id = "xxxxxxxxxxxxxxxxxxxx";
   $PayClass = new PayClass();
   $PayClass->method = getWays::qi;
   $res = $PayClass->QiVoidOrder($orderId,$transiction_id); // return -1 not supported  or 'status'=> 1 succes or 'status'=> 2 error and response
```

Classes
-------

[](#classes)

```
   PayClass     Payment interfaces interconnection
   MainClass    Configuration Payments Gate
   ApsClass     Aps Payment Gate
   QiClass     QiCard Payment Gate
   AmwalClass 	Amwal(PayTabs) Payment Gate
   ZainCash	    ZainCash Payment Gate
   SwitchClass	Switch Payment Gate
   TasdidClass	Tasdid Payment Gate
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1736d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/91744592?v=4)[mars-iq](/maintainers/mars-iq)[@mars-iq](https://github.com/mars-iq)

---

Top Contributors

[![mars-iq](https://avatars.githubusercontent.com/u/91744592?v=4)](https://github.com/mars-iq "mars-iq (98 commits)")

---

Tags

paymentswitchapse-paymentamwalzaincash

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mars-iq-iqpay/health.svg)

```
[![Health](https://phpackages.com/badges/mars-iq-iqpay/health.svg)](https://phpackages.com/packages/mars-iq-iqpay)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M885](/packages/laravel-socialite)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[firefly-iii/data-importer

Firefly III Data Import Tool.

8045.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

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