PHP SDK

The Digitalpaye SDK PHP is a Laravel SDK that allows developers to interact with the Digitalpaye API seamlessly from PHP applications. This SDK simplifies the integration process and provides methods to perform various operations such as:

  • Balance checking

  • Creating collection requests

  • Initiating transfers

Installation

You can install the Digitalpaye SDK PHP via Composer by running the following command:

composer require digitalpaye/digitalpaye-sdk-php

Alternatively, you can download the SDK directly from GitHub: Digitalpaye SDK PHParrow-up-right.

Getting started

Get the balance

<?php
require_once __DIR__ . '/../vendor/autoload.php';
use DigitalpayeSdkPhp\Services\Digitalpaye;

$apikey = "live_digitalpaye129923061";
$apisecret = "d511e1f4-d932-32fcd-a804-371539700d60c";

$config = new Digitalpaye($apikey, $apisecret);
$balance = $config->getBalance();
echo $balance["data"]["amount"];
?>

Create an Orange Money transaction

Create a Wave transaction

Get the status of a transaction

Make a money transfer

Error handling

Status code
Message
Description

400

FIELD_MISSING

Indicates that a required field is missing from the request.

401

TOKEN_EXPIRED

Means that the authentication token has expired and must be renewed.

403

ERROR

General error indicating an access or authorization problem.

406

DEVELOPER_NO_FOUND

Indicates that the specified developer was not found.

407

COMPANY_NO_FOUND

Indicates that no matching company was found.

409

TRANSACTION_DUPLICATED

Indicates that a duplicated transaction has been detected.

410

OPERATOR_NO_SUPPORTED

Means that the specified operator is not supported.

412

AMOUNT_INSUFFISANT

Indicates that the transaction amount is insufficient.

504

PAYMENT_FAILED_TRY_AGAINST

Indicates that the payment failed and should be retried.

506

COMPANY_NO_VERIFY

Means that the company has not been verified.

507

ACCOUNT_COMPANY_DISABLED

Indicates that the company's account is disabled.

200

SUCESSFUL

Request successful.

201

CREATED

The resource has been created successfully.

202

PAYMENT_IS_PENDING

Indicates that the payment is pending.

500

ERROR_INTERNE_TRY_AGAIN

Internal server error. Please try again later.

Last updated