saidtech/zpay

This package is for making an online payments through mpesa and azam pay

v1.0.0 2023-04-23 21:31 UTC

This package is auto-updated.

Last update: 2024-04-24 01:34:05 UTC


README

Laravel wrapper for MPESA AND AZAM PAY APIS into LARAVEL Package

Introduction

Zpay provides an expressive, fluent interface to Vodacom's and Azam pay billing services. It handles almost all of the boilerplate billing code you are dreading writing. In addition to basic payment management, Zpay can handle coupons, swapping subscription, subscription "quantities", cancellation grace periods and much more.

Installation

Laravel

Require this package in your composer.json and update composer. This will download the package and the zpay + phpseclib,simple-qrcode and dompdf libraries also.

composer require saidtech/zpay

Using

Get Session id

You can create a new ZPAY instance and load it's functions to get session id.

    use Saidtech\Zpay\Facades\Zpay;
    $zpay = Zpay::getSession();
    return $zpay;

Make payment request

    use Saidtech\Zpay\Facades\Zpay;
    $zpay = Zpay::sendTransaction($payload, $session,$transactions);
    return $zpay;