kepson / dexchange-php
dexchange api sdk for php
dev-main
2024-09-04 12:34 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.9
- php-http/client-common: ^2.3
- php-http/discovery: ^1.12
- php-http/guzzle7-adapter: ^v1.0
- symfony/options-resolver: ^6.4
Requires (Dev)
- mockery/mockery: 2.0.x-dev
- pestphp/pest: 1.x-dev
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-11-04 12:54:13 UTC
README
A PHP sdk to interact with Dexchange's API
Installation
With Composer
composer require kepson/dexchange-php
REQUIREMENTS
- PHP 8.0+
Usage
Authentication
Generate an API KEY from the Dexchange Api
Setup
<?php include "vendor/autoload.php"; use Dexchange\Client\Options; use Dexchange\Client\DexchangeSdk; $env = 'production'; $apikey = 'sk.8fcdc.a23474b7d2612534df'; $options = new Options($env); $DexchangeSdk = new DexchangeSdk($apikey, $options);
Example
$initTransaction = $DexchangeSdk->Transactions()->intiTransaction(123, 'callBackUrl', 'externalTransactionId', 'failureUrl', 'number', 'serviceCode', 'successUrl');
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Kepsondiaz/dexchange-php. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct. Simply create a new branch and raise a Pull Request, we would review and merge.