diff --git a/app/Http/Controllers/iLinkTransactionController.php b/app/Http/Controllers/iLinkTransactionController.php index 53e9897..64e8f43 100755 --- a/app/Http/Controllers/iLinkTransactionController.php +++ b/app/Http/Controllers/iLinkTransactionController.php @@ -1780,7 +1780,12 @@ class iLinkTransactionController extends Controller 'country_id' => $init_country, 'payment_type' => PaymentType::CASH_OUT, 'payment_method' => PaymentMethod::CARD - ]); + ]) + $this->getBasicTransactionFees([ + 'amount' => $request->montant, + 'country_id' => $init_country, + 'payment_type' => PaymentType::CASH_IN, + 'payment_method' => PaymentMethod::WALLET + ]); $frais += $fees; $taxe = $this->calculateTax($init_country != $request->final_country ? $taxesInternationales : $taxesNationales, $frais); @@ -2153,7 +2158,6 @@ class iLinkTransactionController extends Controller 'payment_type' => PaymentType::CASH_IN, 'payment_method' => PaymentMethod::WALLET ]); - $data['fees'] = $fees; $frais += $fees; } else { $destinataire = User::where('user_code', $request->id_destinataire)->orWhere('phone', $request->id_destinataire)->first(); @@ -2314,7 +2318,12 @@ class iLinkTransactionController extends Controller 'country_id' => $init_country, 'payment_type' => PaymentType::CASH_OUT, 'payment_method' => PaymentMethod::CARD - ]); + ]) + $this->getBasicTransactionFees([ + 'amount' => $request->montant, + 'country_id' => $init_country, + 'payment_type' => PaymentType::CASH_IN, + 'payment_method' => PaymentMethod::WALLET + ]); $frais += $fees; $taxe = $this->calculateTax($init_country != $request->final_country ? $taxesInternationales : $taxesNationales, $frais); $data['frais'] = round($frais + $taxe, 2);