Download the PHP package katorymnd/pawa-pay-integration without Composer

On this page you can find all versions of the php package katorymnd/pawa-pay-integration. 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 pawa-pay-integration

pawaPay PHP SDK

A PHP SDK for integrating with the pawaPay API, enabling seamless payment processing, transaction management, and other key functionalities such as deposit, refund and payouts handling API calls.

Note: V1 is the default main codebase, but V2 has also been integrated so both can work simultaneously.

Folder structure

example\direct

  • Contains all curl sample requests with plain json raw output example
  • Contains live or demo samples for each logic like deposit, refund and more. Both fontend and backend surgical logic samples. data
  • Holds the configs for mno_availability and active_conf json files.

src

  • Holds the structure skeleton for pawaPay PHP SDK. tests
  • Holds the test logics for the processes provided.

Available Features

The pawaPay PHP SDK includes a comprehensive set of features designed to facilitate seamless payment integration with real-time verification:

Table of Contents

Overview

The pawaPay PHP SDK provides a seamless integration of pawaPay's payment processing API with your PHP applications. It supports key functionalities such as deposit processing, real-time transaction verification, and refund handling, along with payouts to single or multiple recipients. All verifications are conducted in real time to ensure accurate and up-to-date transaction status.

Please note that the availability of certain features, such as country-specific payment options and refund capabilities, depends on the configuration of your merchant account. These settings may vary between sandbox and live environments.

Requires PHP versions: >= 8.0.0.

Installation

To install the SDK via Composer, run the following command:

Upgrading to Pawapay SDK V2

If you have not yet installed the SDK, install it and run fetch_mno_conf.php that file or any file that you have created that will add this mno_availability.json, active_conf.json . In our V2 the entire logic is surgically created to use both v1 - default and v2, by your choice.

You can either use v1 or v2 but v1 is made default so that your code does not break if you updated the sdk but not your code base.

When switching to v2/v1 you need to re-intiate the fetch_mno_conf.php with v1 as your choice, then it will create these files in data folder; active_conf_v1.json, mno_availability_v1.json, and v2 will create active_conf_v2.json, mno_availability_v2.json so you will have 3 files.

What the logic does is if v1 is look for v1 or our default json files and if v2 it will load v2. Run this example/fetch_mno_conf.php and you will see that change.

Remove legacy files; the loader still works with versioned files only.

Usage

Initializing the SDK

After installing the SDK, you will need to configure your pawaPay API keys. Update the API keys securely in a .env file and save.

In your browser, load the following file:

This file will load your MNO Availability and Active Configuration via the API and save the details. The entire SDK will rely on this configuration to process transactions.

Update After Saving MNO Configuration

Once you have saved your MNO configuration by loading example/fetch_mno_conf.php, you will need to update the country dropdown and MNO availability checks in your HTML files. This ensures the SDK reflects the correct configuration for processing deposits and payouts. Now V2 is enabled - you can choose V1/V2 logically.

1. Update the Country Dropdown in Your HTML

You need to update the country dropdown in the relevant HTML files (e.g., example/initiate_deposit.html, example/payouts.html) to align with the countries assigned to your merchant account. Here’s an example of the updated dropdown:

example\initiate_deposit.html we added

so you need to change the version from v1 to v2. v1 will load the default ui for the operator images as of _v1.json and v2 will load all the logics from v2, as of _v2.json files in the data folder.

Also its backend file is compatible with v1/v2. Change accordingly.

The logic also applies to example\payouts.html and its backend logic too.

2. Configure the MNO Correspondents in JavaScript

Once you've updated the country dropdown, you'll also need to configure the MNO status dynamically based on the saved MNO configuration. Here's an example of how to manage the MNOs for each country in JavaScript:

3. Configure ISO3 for v2 country metadata in JavaScript

I added a version control

When you choose auto the script will decide accordingly.

The functionaliy is:

Sending API Requests

To test different functionalities of the pawaPay SDK, follow these steps:

Deposit via Payment Page

Use the hosted widget to collect payment with a single redirect. Your app creates a session and receives a redirectUrl to send the customer to.

Make sure your .env has:

Full example

Find the full example here example\deposit-via-payment-pag.php and v1 is default. you may switch like so

For testing, please use the provided test phone numbers (MSISDNs) available in the official pawaPay documentation:

This is a sample page, you can add the details from the form data or just add defaultly. Then create a button that has the got link so that the client is redirected to complete the peyment.

This https://example.com/paymentProcessed replace with your redirect url and the return will be like https://example.com/paymentProcessed?depositId=c4a7a044-5ca0-415b-a236-423f11e1e1e8 where you can use the depositId to verify the payment.

Testing Phone Numbers

Important: Refunds can only be submitted once per deposit ID. Attempting to refund the same deposit ID multiple times will result in an error.

Additionally, every transaction—whether successful or not—will be logged in detail in the log files. You can refer to these log files for an in-depth analysis of any transaction, ensuring you have a complete record for debugging and auditing purposes.

Note: Some providers are slow hence the transaction is in processing mode. Always check the transactionId before making any transaction as completed.

Tutorials and Guides

Explore these resources to get started and make the most of the pawaPay Payment SDK:

  1. Getting Started With the pawaPay SDK: Installation and Setup
    A beginner's guide to installing and setting up the SDK.

  2. How to Configure and Integrate pawaPay SDK: A Step-by-Step Guide
    Detailed instructions on configuring and integrating the SDK into your PHP application.

  3. Transparency in Payments: Owner Name Alerts in Pawapay Sdk
    Explore how the pawaPay PHP SDK enhances transparency in mobile payments with Owner Name notifications, ensuring user confidence and clarity.

🛠️ Need Help?

I'm happy to provide general guidance or clarity regarding the pawaPay PHP SDK. However, please note that custom integrations, advanced support, or SDK development in other programming languages are offered as a paid service.

✅ Support Includes:

❌ Support Does NOT Include:


💰 Paid Support Policy


📩 Request Paid Support or a Custom SDK

To ensure fair and professional collaboration, please complete the following form before requesting any support:

👉 Submit a Support Request

This form helps clarify:

After submitting the form, feel free to reach out:

Contact: [email protected]

Thank you for respecting these boundaries. They help me provide faster, high-quality assistance to those using this SDK for its intended purpose.

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of pawa-pay-integration with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
guzzlehttp/guzzle Version ^7.9
monolog/monolog Version ^3.7
symfony/validator Version ^7.1
jms/serializer Version ^3.30
phpunit/phpunit Version ^11.3
filp/whoops Version ^2.15
vlucas/phpdotenv Version ^5.6
league/iso3166 Version ^4.3
symfony/intl Version ^7.1
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 katorymnd/pawa-pay-integration contains the following files

Loading the files please wait ....