Download the PHP package bawes/myfatoorah-php without Composer

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

PHP Library for the MyFatoorah API

Latest Version Total Downloads

Installation

The preferred way to install this library is through composer.

Either run

or add

to the require section of your application's composer.json file.

Usage

First we need to decide which environment we want to use

Step 1: Initialize based on the environment

Test Environment

Live Environment

Step 2: Request a payment link and redirect to it

Step 3: Request Order Status for Payment status confirmation

Use MyFatoorah::getOrderStatus($referenceId) to get an update on the status of the payment. This is best called after receiving a callback from MyFatoorah's returnUrl or errorReturnUrl. You can also manually call this function after an interval if you store the reference id locally.

Sample Order Status Request

Order Status Response (Success)

Order Status Response (Failure)

Payment Gateways

Configure the gateway you wish to use by passing GATEWAY constants available on the MyFatoorah class to MyFatoorah::setPaymentMode.

Usage Example:

Test cards

These cards will only work if you initialize using MyFatoorah::test() environment.

KNET

Card Number Pin/Expiry Result
8888880000000001 anything CAPTURED
8888880000000002 anything NOT CAPTURED

Benefits

Card Number Expiry Date Pin Result
2222220123456789 12/27 1234 CAPTURED
7777770123456789 12/27 1234 NOT CAPTURED
1111110123456789 12/27 1234 NOT CAPTURED

Visa

Card Number Expiry Date CVV
4005550000000001 05/18 123
4557012345678902 05/18 123

Mastercard

Card Number Expiry Date CVV
5123456789012346 05/18 123
5313581000123430 05/18 123

Amex

Card Number Expiry Date Pin
345678901234564 05/17 1234

Sadad

Payment Method Card Number Expiry Date CVV
Mastercard 5271045423029111 anything anything
Visa 4012001037141112 01/2022 684
Payment Method Account ID Password
Sadad account arun123 Aa123456

All versions of myfatoorah-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-curl Version *
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 bawes/myfatoorah-php contains the following files

Loading the files please wait ....