edit refund calculation to correct formulat

This commit is contained in:
ahmedsophyudden
2021-09-08 23:41:56 +08:00
parent 1c4669a857
commit fa4042ecff
11 changed files with 233 additions and 144 deletions
@@ -57,6 +57,9 @@ class TransactionObject implements DataTransferObject
/** @var array|null */
private $details;
/** @var string */
private $paymentReference;
/**
* TransactionObject constructor.
* @param string $billNo
@@ -75,8 +78,9 @@ class TransactionObject implements DataTransferObject
* @param Carbon|null $expiresOn
* @param int|null $status
* @param array|null $details
* @param string $paymentReference
*/
public function __construct(string $billNo, string $transactionType, int $issuer, int $receiver, int $recipientBankAccountId, int $paymentMethod, float $amount, float $originalAmount, int $currencyId, int $originalCurrencyId, float $currencyRate, float $tax, float $serviceCharge, ?Carbon $expiresOn, ?int $status = ApprovalStatus::PENDING_SUBMISSION, ?array $details = [])
public function __construct(string $billNo, string $transactionType, int $issuer, int $receiver, int $recipientBankAccountId, int $paymentMethod, float $amount, float $originalAmount, int $currencyId, int $originalCurrencyId, float $currencyRate, float $tax, float $serviceCharge, ?Carbon $expiresOn, ?int $status = ApprovalStatus::PENDING_SUBMISSION, ?array $details = [], ?string $paymentReference = null)
{
$this->billNo = $billNo;
$this->transactionType = $transactionType;
@@ -94,6 +98,7 @@ class TransactionObject implements DataTransferObject
$this->expiresOn = $expiresOn;
$this->status = $status;
$this->details = $details;
$this->paymentReference = $paymentReference;
}
/**
@@ -226,6 +231,11 @@ class TransactionObject implements DataTransferObject
}, $this->details);
}
public function getPaymentReference(): string
{
return $this->paymentReference;
}