Download the PHP package interswitch/laravel-interswitch without Composer

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

laravel-interswitch

Issues Forks Stars

Interswitch's official laravel package to easily integrate to Quickteller Business to collect payments. To begin, create an account at https://business.quickteller.com if you haven't already.

Installation

PHP 7.2+ and Composer are required.

To get the latest version of Laravel Interswitch, simply require it like so:

Once installed, the package automatically registers its service provider and facade.

Configuration

You can publish the configuration file using this command:

A configuration file 'interswitch.php' with some defaults is placed in your config directory.

Payment Flow

The payment flow is described below:

  1. User clicks a button to make payment, the user is redirected to the payment page, usually by submitting a form with hidden fields.
  2. On the payment page, there are multiple payment options:
    • Card Option: The user enters card details and follows the prompt.
    • Transfer(Virtual Accounts) Option: The user can pay via a bank transfer either using their financial/bank app or USSD to the dynamic account number displayed to complete the transaction.
    • QR Option: The user can scan the QR displayed on the payment page using their bank app to complete the transaction.
    • USSD Option:
    • The user selects a bank
    • A USSD code is generated
    • User types the USSD code on their mobile device and follows the prompt.
    • Verve Wallet: The user can login to their verve wallet if they have one.
  3. The user gets a prompt indicating a successful or a failed transaction.

Usage

Environments

Quickteller Business provides a test and a live environment.
The test environment allows you to test your integration without actually charging any bank account.
After successfully testing your integration, you can easily switch to the live environment (after all required documents have been uploaded).

For the test environment, in your .env file, add:

For the live environment, in your .env file, add:

If none is present, the test environment is assummed by default.

Furthermore, you need to add the following environment variables:

The INTERSWITCH_REDIRECT_URL is the endpoint you will like to get the status of a transaction. Also define this route in your route file and make a call to confirmTransaction() like so:

To get your INTERSWITCH_PAY_ITEM_ID and INTERSWITCH_MERCHANT_CODE, visit https://business.quickteller.com/developertools

Sample Payment Form

- Create Payment View

Create your view like so:
NOTE: The form must be submitted to interswitch-pay using post method.

Note: 'amount' field must be in kobo

- Supported parameters

Below is a list of all the supported parameters. These parameters can be added in your form:

Parameters Data Type Required Description
customerEmail string true The email of the person making the payment.
amount string true The cost of the item being paid for in kobo.
transactionReference string true This is a unique reference string required for every transaction. You can create a method to generate this.
currency string false The ISO code of the currency being used. If this field is not added, the currency naira is assumed.
customerName string false The name of the person making the payment.
customerID string false The ID of the person making the payment.
payItemName string false The name of the item being paid for.

- Further Steps:

Note:

- Handling the Response

For integrity purpose, you need to make a server side request to get the final status of a transaction before giving value. To do this, make a call to confirmTransaction(transactionReference, amount) like so:

It returns a JSON object containing the status of the transaction. Consider the sample response below:

Below is a description of the response keys: Key Meaning
responseCode A code indicating the status of the transaction.
responseDescription This gives a full description of the transaction status
amount This indicates the total amount transacted in kobo.
paymentReference Indicates the transaction reference generated by the payment gateway.
merchantReference Indicates the transaction reference provided by you.
transactionDate Shows the date and time the transaction took place.

There are quite a number of response codes that can be returned, the full list can be viewed here

Live Environment

To go live,


All versions of laravel-interswitch 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 interswitch/laravel-interswitch contains the following files

Loading the files please wait ....