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)4117proprietaryPHPPHP &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 1mo ago

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 32% 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

1690d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f19bfc59283870690ab03a3ea4a0c4149870e71aedd594ad1fd94c24cafd4c8?d=identicon)[mars-iq](/maintainers/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

[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[paypayopa/php-sdk

PHP SDK for PayPay Open Payment API

18279.6k3](/packages/paypayopa-php-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[yanlongli/app-store-server-api

PHP client for App Store Server API. Manage your customers’ App Store transactions from your server.The App Store Server API is a REST API that you call from your server to request and provide information about your customers' in-app purchases. The App Store signs the transaction and subscription renewal information that this API returns using the JSON Web Signature (JWS) specification.App Store Server API is independent of the app’s installation status on the customer’s devices. The App Store server returns information based on the customer’s in-app purchase history regardless of whether the customer installed, removed, or reinstalled the app on their devices.To request transaction and subscription status information with this API, provide any original transaction identifier that belongs to the customer. The transaction history API responds with a complete list of transactions, 20 at a time, starting with the oldest first. The subscription status API returns the status for all of the customer’s subscriptions, organized by their subscription group identifier.Use the Send Consumption Information endpoint to send information to the App Store when customers request a refund for a consumable in-app purchase, after you receive the CONSUMPTION\_REQUEST App Store server notification. Your data helps inform refund decisions.

2532.0k](/packages/yanlongli-app-store-server-api)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)

PHPackages © 2026

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