PHP code example of henryejemuta / laravel-monnify
1. Go to this page and download the library: Download henryejemuta/laravel-monnify library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
henryejemuta / laravel-monnify example snippets
//...
use HenryEjemuta\LaravelMonnify\Facades\Monnify;
use HenryEjemuta\LaravelMonnify\Exceptions\MonnifyFailedRequestException;
//...
//...
use HenryEjemuta\LaravelMonnify\Facades\Monnify;
//...
$responseBody = Monnify::Transactions()->initializeTransaction(float $amount, string $customerName, string $customerEmail, string $paymentReference, string $paymentDescription, string $redirectUrl, MonnifyPaymentMethods $monnifyPaymentMethods, MonnifyIncomeSplitConfig $incomeSplitConfig = null, string $currencyCode = null);
$responseBody = Monnify::Transactions()->getAllTransactions(array $queryParams);
$responseBody = Monnify::Transactions()->calculateHash(string $paymentReference, $amountPaid, string $paidOn, string $transactionReference);
$responseBody = Monnify::Transactions()->getTransactionStatus(string $transactions);
$responseBody = Monnify::Transactions()->payWithBankTransfer(string $transactionReference, string $bankCode);
//...
use HenryEjemuta\LaravelMonnify\Facades\Monnify;
use HenryEjemuta\LaravelMonnify\Classes\MonnifyPaymentMethod;
use HenryEjemuta\LaravelMonnify\Classes\MonnifyPaymentMethods;
//...
Monnify::initializeTransaction(
15000, "Customer Name", "[email protected] ", "transaction_ref", "Transaction Description",
"https://youdomain.com/afterpaymentendpoint", new MonnifyPaymentMethods(MonnifyPaymentMethod::CARD(), MonnifyPaymentMethod::ACCOUNT_TRANSFER()));
//...
use HenryEjemuta\LaravelMonnify\Facades\Monnify;
use HenryEjemuta\LaravelMonnify\Classes\MonnifyPaymentMethod;
use HenryEjemuta\LaravelMonnify\Classes\MonnifyPaymentMethods;
//...
Monnify::Transactions()->initializeTransaction(
15000, "Customer Name", "[email protected] ", "transaction_ref", "Transaction Description",
"https://youdomain.com/afterpaymentendpoint", new MonnifyPaymentMethods(MonnifyPaymentMethod::CARD(), MonnifyPaymentMethod::ACCOUNT_TRANSFER()));
//...
use HenryEjemuta\LaravelMonnify\Facades\Monnify;
//...
$responseBody = Monnify::Banks()->getBanks();
$responseBody = Monnify::Banks()->getBanksWithUSSDShortCode();
$responseBody = Monnify::Banks()->validateBankAccount(MonnifyBankAccount $bankAccount);
$responseBody = Monnify::Disbursements()->initiateTransferSingle(float $amount, string $reference, string $narration, MonnifyBankAccount $bankAccount, string $currencyCode = null);
$responseBody = Monnify::Disbursements()->initiateTransferSingleWithMonnifyTransaction(MonnifyTransaction $monnifyTransaction);
$responseBody = Monnify::Disbursements()->initiateTransferBulk(string $title, string $batchReference, string $narration, MonnifyOnFailureValidate $onFailureValidate, int $notificationInterval, MonnifyTransactionList $transactionList);
$responseBody = Monnify::Disbursements()->authorizeTransfer2FA(string $authorizationCode, string $reference, string $path);
$responseBody = Monnify::SubAccounts()->createSubAccount(string $bankCode, string $accountNumber, string $email, string $currencyCode = null, string $splitPercentage = null);
$responseBody = Monnify::SubAccounts()->createSubAccounts(array $accounts);
$responseBody = Monnify::SubAccounts()->getSubAccounts();
$responseBody = Monnify::SubAccounts()->deleteSubAccount(string $subAccountCode);
$responseBody = Monnify::ReservedAccounts()->getAllTransactions(array $queryParams);
$responseBody = Monnify::ReservedAccounts()->reserveAccount(string $accountReference, string $accountName, string $customerEmail, string $customerName = null, string $customerBvn = null, string $currencyCode = null, bool $restrictPaymentSource = false, MonnifyAllowedPaymentSources $allowedPaymentSources = null, MonnifyIncomeSplitConfig $incomeSplitConfig = null);
$responseBody = Monnify::ReservedAccounts()->getAccountDetails(string $accountReference);
$responseBody = Monnify::ReservedAccounts()->updateSplitConfig(string $accountReference, MonnifyIncomeSplitConfig $incomeSplitConfig);
bash
php artisan monnify:init