PHPackages                             waad/zaincash - 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. waad/zaincash

ActiveLibrary[Payment Processing](/categories/payments)

waad/zaincash
=============

ZainCash payment Integration Gateway package API for Laravel

v13.0.0(1mo ago)14161MITPHPPHP ^8.3

Since Nov 23Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/waadmawlood/zaincash)[ Packagist](https://packagist.org/packages/waad/zaincash)[ RSS](/packages/waad-zaincash/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (22)Used By (0)

ZainCash Integration API Laravel Package
========================================

[](#zaincash-integration-api-laravel-package)

[![](example/sturcture_zaincash_package.png)](example/sturcture_zaincash_package.png)

This is a Laravel package to integrate ZainCash payment gateway API. For local financial transactions in Iraqi dinars inside Iraq. This package is based on the official ZainCash API documentation. You can find the official documentation [(https://docs.zaincash.iq)](https://docs.zaincash.iq).

[![Total Downloads](https://camo.githubusercontent.com/3bb147499c31dac18557d4767b713eba375e6c3d7fc2e3a70de27fbf1bfac25d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776161642f7a61696e63617368)](https://packagist.org/packages/waad/zaincash)[![Latest Stable Version](https://camo.githubusercontent.com/2d08d8be2c84cf5883d944aaa165ccbcfc2dd9f06c738442333c78f7d87c9280/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776161642f7a61696e63617368)](https://packagist.org/packages/waad/zaincash)[![License](https://camo.githubusercontent.com/142beca7c2fe2497b648ae5b2d9abc694afcb21d2f9a189855f36e0f1fc4db54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776161642f7a61696e63617368)](https://packagist.org/packages/waad/zaincash)

🎀 Requirements
--------------

[](#-requirements)

Package VersionLaravel VersionPHP Version6.x6.x7.2+7.x7.x7.2.5+8.x8.x7.3+ | 8.0+9.x9.x8.0+10.x10.x8.1+11.x11.x8.2+12.x12.x8.2+📌 Installation
--------------

[](#-installation)

```
composer require waad/zaincash
```

publish config file to `config/zaincash.php`

```
php artisan vendor:publish --tag="zaincash"
```

update config zaincash in `config/zaincash.php` or from `.env` file

KeyTypeDefaultDescriptionmsisdnstring9647835077893The mobile phone number for your wallet, provided by Zain Cash. Example format: 9647835077893.merchant\_idstring5ffacf6612b5777c6d44266fThe Merchant ID obtained from ZainCash.secretstring$2y$10$h................The secret used to decode and encode JWT during requests. Obtain from ZainCash.testbooltrueSpecify the environment for using the ZainCash API. Set 'test' to false for the live environment after obtaining all credentials from ZainCash.test\_urlstringURL for the ZainCash test environment.live\_urlstringURL for the ZainCash live environment.languagestringarSet the language for the ZainCash payment page. Use 'ar' for Arabic or 'en' for English.prefix\_order\_idstringwa3d\_Prefix for the order ID.is\_redirectboolfalseSpecify whether or not to redirect to the ZainCash payment page. If false, ZainCash returns a Transaction ID to the backend. If true, redirection after the request.min\_amountint250Set the minimum amount for a valid transaction in Iraqi Dinar (IQD). Transactions with amounts less than this value will be considered invalid.timeoutint10Set the timeout for the request in seconds.verify\_sslbooltrueSet the verify SSL for the request to ZainCash's API.
Configurations to `.env` file

```
ZAINCASH_MSISDN=9647835077893                  # Test Credentials
ZAINCASH_MERCHANT_ID=5ffacf6612b5777c6d44266f  # Test Credentials
ZAINCASH_SECRET=$2y$10$h................       # Test Credentials
ZAINCASH_TEST=true                             # default true
ZAINCASH_PREFIX_ORDER_ID=wa3d_                 # default wa3d_
ZAINCASH_LANGUAGE=ar                           # optional default ar
ZAINCASH_IS_REDIRECT=false                     # optional default false
ZAINCASH_MIN_AMOUNT=250                        # optional default 250
ZAINCASH_TEST_URL=https://test.zaincash.iq/    # optional
ZAINCASH_LIVE_URL=https://api.zaincash.iq/     # optional
ZAINCASH_TIMEOUT=10                            # optional
ZAINCASH_VERIFY_SSL=true                       # optional
```

```
php artisan optimize
```

🍔 Usage
-------

[](#-usage)

use `ZainCash` Facade or Class example

**Facade**```
