Download the PHP package robustastudio/payfort-start-php without Composer

On this page you can find all versions of the php package robustastudio/payfort-start-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 payfort-start-php

Build Status

Start PHP

Start makes accepting payments in the Middle East ridiculously easy. Sign up for an account at https://start.payfort.com.

Getting Started

Using Start with your PHP project is simple.

Install via Composer

If you're using Composer (and really, who isn't these days amirite?), you can simply run:

.. or add a line to your composer.json file:

Now, running php composer.phar install will pull the library directly to your local vendor folder.

Install Manually

Get source code of the latest release from github repository: https://github.com/RobustaStudio/payfort-start-php/releases/latest and copy it to your project.

Inside your php file add this:

Note for Windows: Before you start development with start-php, please check that your php_curl can work with our ssl certificate (TLSv1.2). You can do this by running unit tests. If you see "SSL connection error" it means that you need to install a new php version (at least 5.5.19).

Note: If you're running on a shared host, then you may need to set the allow_url_fopen flag for the php commands. For the install command, for example, this would look like php -d allow_url_fopen=On composer.phar install. The -d overrides the php.ini settings, where allow_url_fopen is usually set to Off.

Using Start

You'll need an account with Start if you don't already have one (grab one real quick at start.payfort.com and come right back .. we'll wait).

Got an account? Great .. let's do this.

1. Initializing Start

To get started, you'll need to initialize Start with your secret API key. Here's how that looks (fear not .. we're using a test key, so no real money will be exchanging hands):

That's it! You probably want to do something with the Start object though -- it gets really bored when it doesn't have anything to do.

Let's run a transaction, shall we.

2. Processing a transaction through Start

Now, for the fun part. Here's all the code you need to process a transaction with Start:

This transaction should be successful since we used the 4242 4242 4242 4242 test credit card. For a complete list of test cards, and their expected output you can check out this link here.

How can you tell that it was successful? Well, if no exception is raised then you're in the clear.

3. Handling Errors

Any errors that may occur during a transaction is raised as an Exception. Here's an example of how you can handle errors with Start:

Testing Start

It's probably a good idea to run the unit tests to make sure that everything is fine and dandy. That's also simple.. just run this command from the root of your project folder:

Note: you'll need to pull the development dependencies as well, using composer update --dev in order to run the test suites.

Contributing

Read our Contributing Guidelines for details

Copyright (c) Payfort.


All versions of payfort-start-php with dependencies

PHP Build Version
Package Version
No informations.
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 robustastudio/payfort-start-php contains the following files

Loading the files please wait ....