Download the PHP package paynow/php-sdk without Composer

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

Paynow Zimbabwe PHP SDK

PHP SDK for Paynow Zimbabwe's API

Prerequisites

This library has a set of prerequisites that must be met for it to work

  1. PHP version 5.6 or higher
  2. Curl extension

Installation

Install the library using composer

and include the composer autoloader



Or

Alternatively, if you do not have composer installed, first download the library here. And include the autoloader file included with the library

Usage example

Create an instance of the Paynow class optionally setting the result and return url(s)

Create a new payment passing in the reference for that payment (e.g invoice id, or anything that you can use to identify the transaction and the user's email address

You can then start adding items to the payment

When you're finally ready to send your payment to Paynow, you can use the send method in the $paynow object.

The response from Paynow will b have some useful information like whether the request was successful or not. If it was, for example, it contains the url to redirect the user so they can make the payment. You can view the full list of data contained in the response in our wiki

If request was successful, you should consider saving the poll url sent from Paynow in the database


Mobile Transactions

If you want to send an express (mobile) checkout request instead, the only thing that differs is the last step. You make a call to the sendMobile in the $paynow object instead of the send method.

The sendMobile method unlike the send method takes in two additional arguments i.e The phone number to send the payment request to and the mobile money method to use for the request. Note that currently only ecocash and onemoney are supported

The response object is almost identical to the one you get if you send a normal request. With a few differences, firstly, you don't get a url to redirect to. Instead you instructions (which ideally should be shown to the user instructing them how to make payment on their mobile phone)

Checking transaction status

The SDK exposes a handy method that you can use to check the status of a transaction. Once you have instantiated the Paynow class.

Full Usage Example


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.3
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 paynow/php-sdk contains the following files

Loading the files please wait ....