Download the PHP package llabbasmkhll/laravel-zibal without Composer

On this page you can find all versions of the php package llabbasmkhll/laravel-zibal. 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 laravel-zibal


Logo Logo

laravel zibal

transaction request package for zibal

Getting Started

To get a local copy up and running follow these simple steps.

Installation

  1. You can install the package via composer:

note that you only need to do following steps if you want to change merchant id . if you only want to test the webservice , no need to do these steps

  1. publish config file to your project

  2. change merchant value to your merchant id in config/zibal.php ( use zibal for testing )



Usage

first include package facade into your file by :


according to zibals official documentation there is 3 steps to issue a transaction in zibal

1 . Request :

in this step zibal gets basic information about the transaction and returns trackId that is needed for next step

use this to init the transaction request :

this will return an array consist of result , message and trackId

result represents the request status as below. status meaning
100 successful operation
102 merchant not found
103 merchant not active
104 merchant not valid
201 processed before
105 amount must be grater than 1000
106 callbackUrl is not valid
113 amount greater than maximum

you can add validate() function after init like below :

this will redirect the user to 404 page if the result code was anything except 100.


2 . Start :

redirect the user to zibals gateway for payment use :


you may combine first and second step into one line of code like this :

that will init the transaction , then redirect the user zibals payment page if init was successful , otherwise it will redirect the user to 422 page


3 . Verify :

you can use this line of code to verify the transaction status:

this will return an array consist of below parameters parameter discription
paidAt datetime of the payment
cardNumber masked card number that used to pay
status status of the payment (discribed below)
amount amount of the payment
refNumber payment reference number (in case of successful operation)
description description of the payment
orderId the same id that you passed in init
result result of the request
message short description of the request


result represents the request status as below. code meaning
100 successful operation
102 merchant not found
103 merchant not active
104 merchant not valid
201 processed before
202 payment failed (reason in status)
203 invalid trackId


status represents the request status as below. status meaning
-2 internal failure
-1 wating for payment
1 paid - verified
2 paid - unverified
3 canceled by user
4 invalid card number
5 not enough balance
6 invalid code
7 maximum request length reached
8 maximum daily online payment number reached
9 maximum daily online payment amount reached
10 invalid card issuer
11 switch error
12 card unreachable



Example Controller



Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.



License

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



Contact

Abbas mkhzomi - Telegram@llabbasmkhll - [email protected]

Project Link: https://github.com/llabbasmkhll/laravel-zibal


All versions of laravel-zibal with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3|8.0.*
laravel/framework Version 5.*|6.*|7.*|8.*|9.*
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 llabbasmkhll/laravel-zibal contains the following files

Loading the files please wait ....