fix: move check balance verification only when wallet type is not ilink
This commit is contained in:
parent
e3940a4ad4
commit
d3b9fe0e41
|
@ -1820,18 +1820,21 @@ class iLinkTransactionController extends Controller
|
|||
//Verification des limites reglementaires
|
||||
$this->checkReguationsLimits($walletUser->id, $init_country, $request->final_country, $transaction->montant);
|
||||
|
||||
$balance = $this->checkBalance([
|
||||
'country_id' => $request->final_country,
|
||||
'amount' => $request->montant
|
||||
]);
|
||||
|
||||
if (!is_string($balance)) {
|
||||
return $balance;
|
||||
}
|
||||
|
||||
$configPayeur = ConfigWallet::where('id_network', $request->network_destinataire)->firstOrFail();
|
||||
$reseauPayeur = PayingNetwork::where('id_network', $request->network_destinataire)->where('id_configWallet', $config->id)->first();
|
||||
|
||||
if ($configPayeur->type != 'ilink') {
|
||||
$balance = $this->checkBalance([
|
||||
'country_id' => $request->final_country,
|
||||
'amount' => $request->montant
|
||||
]);
|
||||
|
||||
if (!is_string($balance)) {
|
||||
return $balance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$frais = $this->calculateFees($init_country != $request->final_country ? $plr_user_cart_autre_wallet_international : $plr_user_cart_autre_wallet_national, $request->montant);
|
||||
$fees = $this->getBasicTransactionFees([
|
||||
'amount' => $request->montant,
|
||||
|
|
Loading…
Reference in New Issue