The official repository of AzPays for Laravel
You can install the package via composer:
composer require azpays/laravel
php artisan vendor:publish --provider="AzPays\Laravel\AzPaysServiceProvider"
The sandbox mode is used to test the AzPays API. You can set your sandbox mode in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_SANDBOX_MODE=true
The debug mode is used to debug the AzPays API. You can set your debug mode in the config file called config/azpays.php
or add change your APP_DEBUG
value in your .env
file.
The API URL is used to set the AzPays API URL. You can set your API URL in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_API_URL=https://azpays.net/api
The sandbox API URL is used to set the AzPays sandbox API URL. You can set your sandbox API URL in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_SANDBOX_API_URL=https://sandbox.azpays.net/api
The API key is used to authenticate the AzPays API. The API key is generated from the AzPays dashboard.
You can set your API key in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The API version is used to set the AzPays API version. You can set your API version in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_API_VERSION=v1
The routes enabled is used to enable the AzPays routes. You can set your routes enabled in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_ROUTES_ENABLED=true
The routes prefix is used to set the AzPays routes prefix. You can set your routes prefix in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_ROUTES_PREFIX=azpays
The merchant key is used to authenticate the merchant. The merchant key is generated from the AzPays dashboard.
You can set your merchant key in the config file called config/azpays.php
or add key in your .env
file as follows.
AZPAYS_MERCHANT_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This method is used to create a payment request. The payment request is created with the following parameters.
amount
(string) - The amount to be paid in USD (Fiat Amount).
To create a payment request, you can use the following code.
dispatch_sync(new \AzPays\Laravel\Jobs\CreatePaymentJob('100'));
This method is used to checkout a payment request. The payment request is checked out with the following parameters.
token
(string) - The payment token that given as unique reference in payment create method.
To checkout a payment request, you can use the following code.
dispatch_sync(new \AzPays\Laravel\Jobs\CheckoutPaymentJob('PAYMENT_TOKEN'));
This method is used to check a payment request. The payment request is checked with the following parameters.
token
(string) - The payment token that given as unique reference in payment create method.
To check a payment request, you can use the following code.
dispatch_sync(new \AzPays\Laravel\Jobs\CheckPaymentJob('PAYMENT_TOKEN'));
This method is used to claim a wallet. The wallet is claimed with the following parameters.
currency
(int) - The currency universal code that given as unique reference inEnums\Wallet\Currency
.amount
(string) - The amount to be claimed in USD (Fiat Amount).payment
(string) - The payment token that given as unique reference in payment create method.
To claim a wallet, you can use the following code.
dispatch_sync(new \AzPays\Laravel\Jobs\ClaimWalletJob(10001, '100', 'PAYMENT_TOKEN'));
If you discover any security related issues, please email security@azpays.net instead of using the issue tracker.