1. Go to this page and download the library: Download jn-devops/payment 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/ */
jn-devops / payment example snippets
use Homeful\Payment\Payment;
use Homeful\Payment\Class\Term;
$payment = (new Payment)
->setPrincipal(850000.0)
->setTerm(new Term(20)) // 20 years
->setInterestRate(6.25 / 100);
$monthly = $payment->getMonthlyAmortization();
echo $monthly->format(); // e.g. PHP 6,213.00
use Homeful\Common\Classes\DeductibleFeeFromPayment;
$payment->addDeductibleFee(new DeductibleFeeFromPayment('promo', 125, true));
echo $payment->getIncomeRequirement(); // e.g. PHP 20,710.00
use Homeful\Payment\PresentValue;
use Homeful\Payment\Class\Term;
$pv = (new PresentValue)
->setPayment(19978.48)
->setTerm(new Term(20))
->setInterestRate(7 / 100);
echo $pv->getDiscountedValue()->format(); // e.g. PHP 2,576,874.00