Fixes for fee calculations
This commit is contained in:
parent
1440a1291a
commit
8890df9e7e
1 changed files with 4 additions and 3 deletions
|
|
@ -346,9 +346,10 @@ class CompanyGateway extends BaseModel
|
|||
if($fees_and_limits->fee_percent == 100){ //unusual edge case if the user wishes to charge a fee of 100% 09/01/2022
|
||||
$fee += $amount;
|
||||
}
|
||||
elseif ($fees_and_limits->adjust_fee_percent) {
|
||||
$fee += round(($amount / (1 - $fees_and_limits->fee_percent / 100) - $amount), 2);
|
||||
} else {
|
||||
// elseif ($fees_and_limits->adjust_fee_percent) {
|
||||
// $fee += round(($amount / (1 - $fees_and_limits->fee_percent / 100) - $amount), 2);
|
||||
// }
|
||||
else {
|
||||
$fee += round(($amount * $fees_and_limits->fee_percent / 100), 2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue