Download the PHP package waad/zaincash without Composer

On this page you can find all versions of the php package waad/zaincash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zaincash

ZainCash Integration API Laravel Package

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

Total Downloads Latest Stable Version License

🎀 Requirements

Package Version Laravel Version PHP Version
6.x 6.x 7.2+
7.x 7.x 7.2.5+
8.x 8.x 7.3+ | 8.0+
9.x 9.x 8.0+
10.x 10.x 8.1+
11.x 11.x 8.2+

📌 Installation


publish config file to config/zaincash.php

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

Key Type Default Description
msisdn string 9647835077893 The mobile phone number for your wallet, provided by Zain Cash. Example format: 9647835077893.
merchant_id string 5ffacf6612b5777c6d44266f The Merchant ID obtained from ZainCash.
secret string $2y$10$h................ The secret used to decode and encode JWT during requests. Obtain from ZainCash.
test bool true Specify the environment for using the ZainCash API. Set 'test' to false for the live environment after obtaining all credentials from ZainCash.
test_url string https://test.zaincash.iq/ URL for the ZainCash test environment.
live_url string https://api.zaincash.iq/ URL for the ZainCash live environment.
language string ar Set the language for the ZainCash payment page. Use 'ar' for Arabic or 'en' for English.
prefix_order_id string wa3d_ Prefix for the order ID.
is_redirect bool false Specify 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_amount int 1000 Set the minimum amount for a valid transaction in Iraqi Dinar (IQD). Transactions with amounts less than this value will be considered invalid.
timeout int 10 Set the timeout for the request in seconds.
verify_ssl bool true Set the verify SSL for the request to ZainCash's API.


Configurations to .env file



🍔 Usage

use ZainCash Facade or Class example

Facade
Class


- Getter And Setter Attributes Table

Attribute Important Type Getter Setter Default
amount 🟢 int-float-null getAmount() setAmount($amount) -
serviceType 🟢 string-null getServiceType() setServiceType($serviceType) -
orderId 🟢 string-int-float-null getOrderId() setOrderId($orderId) -
transactionID 🟢 string-null getTransactionID() setTransactionID($transactionID) -
isReturnArray 🟢 bool getIsReturnArray() setIsReturnArray($isReturnArray) false
minAmount 🔴 int-float-null getMinAmount() setMinAmount($minAmount) -
msisdn 🔴 string-null getMsisdn() setMsisdn($msisdn) -
secret 🔴 string-null getSecret() setSecret($secret) -
merchantId 🔴 string-null getMerchantId() setMerchantId($merchantId) -
isTest 🔴 bool-null getIsTest() setIsTest($isTest) -
language 🔴 string-null getLanguage() setLanguage($language) -
baseUrl 🔴 string-null getBaseUrl() setBaseUrl($baseUrl) -
isRedirect 🔴 bool getIsRedirect() setIsRedirect($isRedirect) -
tUrl 🔴 string-null getTUrl() setTUrl($tUrl) -
cUrl 🔴 string-null getCUrl() setCUrl($cUrl) -
rUrl 🔴 string-null getRUrl() setRUrl($rUrl) -
processingUrl 🔴 string-null getProcessingUrl() setProcessingUrl($processingUrl) -
processingOtpUrl 🔴 string-null getProcessingOtpUrl() setProcessingOtpUrl($processingOtpUrl) -
cancelUrl 🔴 string-null getCancelUrl() setCancelUrl($cancelUrl) -
timeout 🔴 int-null getTimeout() setTimeout($timeout) -
verifySsl 🔴 bool-null getVerifySsl() setVerifySsl($verifySsl) -

⚠️ Important column means that this attribute is constantly used and has no default value. On the contrary, we can change it, but it will take the default value from config/zaincash.php.


- Steps from create a transaction To Complete Payment

Step 1 - Create a transaction



Response example



Step 2 - Check a transaction



Response Example dependent by status:



Step 3 - Processing a transaction



Response Example dependent by success:



Step 4 - Complete a transaction



Response Example dependent by success:



Step 5 - Cancel a transaction



Response Example dependent by success:



🧔 Author

Author: Waad Mawlood

Email: [email protected]

⚖️ License

The MIT License (MIT). Please see MIT license for more information.


All versions of zaincash with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package waad/zaincash contains the following files

Loading the files please wait ....