Download the PHP package machour/clictopay without Composer
On this page you can find all versions of the php package machour/clictopay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package clictopay
ClicToPay PHP SDK
A modern, type-safe PHP SDK for ClicToPay payment gateway integration. Framework-agnostic - works with any PHP 8.3+ project (Laravel, Symfony, WordPress, or vanilla PHP).
Features
- ✅ Framework-independent - Uses Guzzle HTTP client
- ✅ Type-safe - Full type hints and return types using Spatie Laravel Data
Installation
Requirements
- PHP 8.3 or higher
- Guzzle HTTP client (installed automatically)
Quick Start
Complete API Reference
1. Register Payment (Authorization)
Creates a new payment and returns a URL to redirect the customer to the payment page.
2. Pre-Authorize Payment
Creates a pre-authorization that will need to be deposited later.
3. Deposit (Capture Pre-Authorization)
Captures a previously pre-authorized payment.
4. Cancel (Reverse) Payment
Cancels a payment or pre-authorization.
5. Refund Payment
Refunds a completed payment (partial or full).
6. Check Payment Status
Gets the current status of a payment.
7. Extended Payment Status
Gets detailed payment status including 3D Secure information.
HTTP Client Customization
The SDK uses Guzzle as its HTTP client. You can customize the Guzzle instance with your own configuration:
Custom Timeout
Using a Proxy
Logging Requests
For more Guzzle configuration options, see the official Guzzle documentation.
Response Handling
All API methods return typed response objects with helper methods:
Error Handling
The SDK throws Machour\ClicToPay\Exception for all errors:
Testing
Run the test suite:
Run static analysis with PHPStan:
Run tests with coverage:
Framework Integration Examples
Laravel
Symfony
Vanilla PHP
License
BSD-3-Clause