Download the PHP package hypertech/paysuite-php-sdk without Composer
On this page you can find all versions of the php package hypertech/paysuite-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hypertech/paysuite-php-sdk
More information about hypertech/paysuite-php-sdk
Files in hypertech/paysuite-php-sdk
Package paysuite-php-sdk
Short Description Paysuite client API SDK
License Apache-2.0
Homepage https://packagist.org/packages/hypertech/paysuite-php-sdk
Informations about the package paysuite-php-sdk
How to Use the PaySuite PHP SDK
The paysuite-php-sdk
library allows you to process payments quickly and easily using payment methods available in Mozambique, such as Mpesa, eMola, PayPal, and bank transfers.
🇵🇹 Documentação em Português
Installation
-
Create an account at Paysuite.tech and obtain your access token from the dashboard
- Install the library using Composer:
Basic Usage
First, import and initialize the client with your token:
Create a Payment
Check Payment Status
Validation Rules
The SDK implements comprehensive validation for all API requests:
-
Payment Request Validation:
amount
: Must be a positive numberreference
: Required stringdescription
: Required stringreturn_url
: Must be a valid URL
- UUID Validation:
- Payment IDs must follow the standard UUID format (8-4-4-4-12 hexadecimal characters)
- Example:
550e8400-e29b-41d4-a716-446655440000
Response Handling
The Response
class provides convenient methods to access payment data:
Error Handling
The SDK includes two main types of exceptions:
ValidationException
: For input validation errors (missing fields, invalid values)PaysuiteException
: For API errors (authentication, server errors, etc.)
Error responses include:
- HTTP 400: Bad Request (validation errors)
- HTTP 401: Unauthorized (invalid token)
- HTTP 404: Not Found (invalid payment ID)
- HTTP 500: Server Error
Running Tests
Configure your test token in the phpunit.xml
file or via environment variable:
Changelog
Please see CHANGELOG for more details.
Contributing
Please see CONTRIBUTING for more details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of paysuite-php-sdk with dependencies
ext-json Version *
ext-curl Version *