1. Go to this page and download the library: Download azaharizaman/nexus-payable 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/ */
use Nexus\Payable\Contracts\ThreeWayMatcherInterface;
$matcher = app(ThreeWayMatcherInterface::class);
// Perform matching against PO and GRN
$matchResult = $matcher->match($bill->getId());
if ($matchResult->isMatched()) {
// Bill can be posted to GL
$payableManager->postBillToGL($bill->getId());
} else {
// Review variances manually
$variances = $matchResult->getVariances();
}
// Schedule payment
$schedule = $payableManager->schedulePayment($bill->getId());
// Process payment and post to GL
$payment = $payableManager->processPayment($schedule->getId(), [
'payment_date' => '2025-12-15',
'payment_method' => 'bank_transfer',
'bank_account' => '1000-01',
'reference' => 'PAY-2025-001'
]);