Skip to content

AlhasanIQ/zaincash-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


AlhasanIQ/ZainCashSDK

AN Unofficial PHP SDK for ZainCash Iraq
Examples · Report a Bug · Request Feature

Table of Contents

About The Project

This is an Unofficial PHP (Composer & PSR Compatible) SDK to integrate ZainCash Iraq with php applications.

Motive:

  • The Official SDK is un-documented.
  • The Official SDK is not Object Oriented (imperative).
  • The Official SDK has some bad practices and 0 encapsulation of logic.

Important Note

Most of the code here is not properly tested and hasn't been touched since i worked at ZainCash in 2015-2016.

Kindly, inspect the code closely and make sure it fits your needs.

The code is provided as-is and no guarantees are given regarding functionality/security.

While this project started when i used to work at ZainCash (2015-2016), I wrote all of this code on my own spare time.

Installation

While the package is not suited for production usage at its current stage, and is mainly intended for educational purposes (for now), below is how you can install it to an existing composer project:

Modify your composer.json to add a repositories source and a require statement:

{
    ...

	"repositories": [
		{
			"type": "vcs",
			"url": "https://github.com/alhasaniq/zaincash-sdk.git"
		}
	],

	"require": {
		"alhasaniq/zaincash-sdk": "dev-master"
	}
}

Usage

For Usage Examples, kindly refer to the examples folder which includes 2 examples of the 2 main endpoints needed:

  • An endpoint to initiate the transaction (charge the user), which redirects users to zaincash to finish the payment.
  • Another endpoint to capture the transaction status and info, after being redirected back to your application (from zaincash).

Contributing

The project is at a hobbyist-project state, where it is not properly tested/updated.

If you use this on production, your feedback is highly appreciated.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Alhasan A. AL-Nasiry - @alhasaniq

Project Link: https://github.com/alhasaniq/zaincash-sdk

About

An Unofficial SDK for ZainCash Iraq

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages