feature(ilink transaction): add payout payment in Agent - Envoi cash vers aure wallet

This commit is contained in:
Djery-Tom 2023-07-03 08:30:21 +01:00
parent 5d6d278fb8
commit ef554d0ad0
1 changed files with 16 additions and 0 deletions

View File

@ -1068,6 +1068,22 @@ class iLinkTransactionController extends Controller
// $walletUser->balance += $transaction->montant_net_final_country;
// $transaction->id_destinataire = r
$countryCurrency = CountriesCurrency::findOrFail($request->final_country);
// PayOut through payment service
$this->handlePayOut($transaction, [
'network_name' => $reseauPayeur->network->name,
'payment_method' => 'WALLET',
'amount' => $transaction->montant_net_final_country,
'currency' => $countryCurrency->currency_code,
'customer_id' => $agent->id,
'customer_email' => $request->input('email_emetteur'),
'customer_name' => $request->input('prenom_destinataire'),
'customer_surname' => $request->input('nom_destinataire'),
'customer_phone_number' => $transaction->id_destinataire,
'customer_country' => $countryCurrency->code_country,
'reason' => "Agent - Envoi de cash vers autre wallet"
]);
$final_country = $request->final_country;
$plr_agent_cash_wallet_or_cash_national = $this->getPaliers($paliers_commission_wallets, 'agent_cash_wallet_or_cash_national');
$plr_agent_cash_wallet_or_cash_international = $this->getPaliers($paliers_commission_wallets, 'agent_cash_wallet_or_cash_international');