Download the PHP package codevirtus/pesepay without Composer

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

PesePay PHP SDK

A simple PHP SDK for integrating PesePay payments into your application.


Installation

Install the package via Composer:


Getting Started

1. Import the SDK

2. Initialize the Client

Create a new Pesepay instance using the credentials provided by PesePay.

To use the sandbox environment (testing only, no real money), pass true as the third argument:

3. Configure Callback URLs

Set the URLs that PesePay will use after processing a payment.


Seamless Payments

Seamless payments allow customers to complete payment directly within your application.

Step 1: Create a Payment

Note: Either the customer's email address or phone number must be provided.


Step 2: Provide Required Payment Fields

Different payment methods require different fields.

Visa

Mobile Money (EcoCash, InnBucks, etc.)


Step 3: Submit the Payment


Redirect Payments

Redirect payments send the customer to the PesePay checkout page to complete payment.

Step 1: Create a Transaction


Step 2: Initiate the Transaction


Split Payments

Split payments let you act as an aggregator: you collect payments on behalf of another (beneficiary) merchant, and Pesepay settles your agreed share (commission/service fee) and the beneficiary's share according to the configured split arrangement.

Both the redirect and seamless flows support split payments. Attach the payment metadata to your transaction or payment before submitting it.

Redirect Flow

Seamless Flow

splitAmountMode

splitAmountMode determines how your configured master merchant share is applied to the request amount:

Mode Description
PRINCIPAL The request amount is the total charged to the customer. Your share is deducted from it and the beneficiary receives the balance.
ADD_ON The request amount is the beneficiary's principal. They receive it in full and your share is added on top for the customer.

Aliases are accepted and normalised automatically: PRINCIPAL_AMOUNTPRINCIPAL; ADDON, ADDED_ON_TOP, ON_TOPADD_ON.

Note: When your application is configured for split payments, beneficiaryMerchantEmail is required on every transaction.


Checking Payment Status

You can verify a payment using either the transaction reference number or the poll URL returned when the payment was created.

Option 1: Check by Reference Number


Option 2: Check by Poll URL


Response Methods

Most SDK responses provide the following helper methods:

Method Description
success() Returns true if the request completed successfully.
message() Returns the error message if the request failed.
referenceNumber() Returns the PesePay transaction reference.
pollUrl() Returns the polling URL used to check payment status.
amount() Returns the transaction amount.
currencyCode() Returns the transaction currency.
transactionServiceFee() Returns the service fee charged.
transactionMetadata() Returns additional transaction metadata.
rawData() Returns the complete API response.
metadataCode() Returns the InnBucks payment code (where applicable).
metadataQrCode() Returns the InnBucks QR code (where applicable).
redirectUrl() Returns the checkout URL for redirect payments.
paid() Returns true if the payment has been completed successfully.

All versions of pesepay with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
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 codevirtus/pesepay contains the following files

Loading the files please wait ...