The Wallex SDK is a software development kit that provides a set of tools and utilities for integrating with the Wallex payment gateway.
This section provides instructions on how to get started with the Wallex SDK.
composer require sq-dev/wallex-sdk
This section describes the main features and capabilities of the Wallex SDK.
use Wallex\Widget;
$widget = new Widget(1, 'secret_key');
$url = $widget->cretePayment(
'client@mail.ru',
'Xiaomi 9T',
1000,
1,
'Hello thanks for order',
'Xiaomi 9T',
'USDT',
'rub',
'ru'
); // Returns payment url
More information about the parameters can be found in the documentation.
use Wallex\Webhook;
$payment = new Webhook($_POST);
if ($payment->isVerified('secret_key') && $payment->isSuccess()) {
// Payment success logic
//F.e:
$client = $payment->getClient(); // Get client email
User::where('email', $client)
->update(['balance' => $payment->getAmount()]);
}
use Wallex\Payout;
$payout = new Payout($merchantId, $secretKey);
$payout->cryptoPay($address, $amount, $currency);
More information about the parameters can be found in the documentation.
We welcome contributions from the developer community to improve the Wallex SDK. If you are interested in contributing to the Wallex SDK, please follow the steps below:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Make the necessary changes in your branch.
- Write tests to ensure the changes are working as expected.
- Submit a pull request with your changes.
The Wallex SDK is licensed under the MIT License.