From 648d45cc4bcaecba6b17f198c1322eec38b14871 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Thu, 8 Oct 2020 14:24:16 +0100 Subject: [PATCH] + Fix iLinkTransactionController card transaction v3 --- app/Http/Controllers/iLinkTransactionController.php | 9 ++++----- resources/lang/en/messages.php | 4 ++-- resources/lang/fr/messages.php | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/iLinkTransactionController.php b/app/Http/Controllers/iLinkTransactionController.php index 1419a27..121d9b0 100755 --- a/app/Http/Controllers/iLinkTransactionController.php +++ b/app/Http/Controllers/iLinkTransactionController.php @@ -238,7 +238,6 @@ class iLinkTransactionController extends Controller $body['amount'] = $montantDepot; $identification = Identification::where('id_user', $user->id)->first(); $body['cardholder_name'] = $identification ? $identification->lastname . ' ' . $identification->firstname : $user->lastname . ' ' . $user->firstname; //"John Smith" ; - dd($body['cardholder_name']); $body['currency'] = $this->getCurrency($init_country); $body['ref'] = date("Y-m-d H:i:s.u"); @@ -468,7 +467,7 @@ class iLinkTransactionController extends Controller $transaction->save(); $message = trans('messages.successful_user_remove_from_cart_to_wallet', ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), - 'net' => $this->toMoney($montantRetrait, $init_country), 'fees' => $this->toMoney($frais, $init_country), + 'total' => $this->toMoney($montantRetrait, $init_country), 'fees' => $this->toMoney($frais, $init_country), 'sender_code' => $user->user_code, 'cart_number' => wordwrap($transaction->numero_carte, 4, ' ', true)]); $this->sendMail($user->email, trans('messages.successful_transaction'), $message); return $this->successResponse($message . trans('messages.sent_by_mail')); @@ -497,8 +496,8 @@ class iLinkTransactionController extends Controller $transaction->final_country = $init_country; $frais = $request->montant * $config->taux_com_user_carte_cash / 100; - $transaction->montant_net_final_country = $transaction->montant_net = $transaction->montant; - $montantRetrait = $transaction->montant + $frais; + $transaction->montant_net = $montantRetrait = $transaction->montant + $frais; + $transaction->montant_net_final_country = $transaction->montant; // $body['amount'] = $this->toUSDAmount($montantRetrait, $init_country); $body['card_number'] = $user->numero_carte; $body['cvv'] = $request->cvv; @@ -537,7 +536,7 @@ class iLinkTransactionController extends Controller $message = trans('messages.successful_user_remove_from_cart_to_cash', ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), 'final_country' => $this->getCountryName($init_country), 'init_country' => $this->getCountryName($init_country), - 'net' => $this->toMoney($transaction->montant, $init_country), 'fees' => $this->toMoney($frais, $init_country), 'code' => wordwrap($code_retrait, 4, ' ', true), + 'total' => $this->toMoney($transaction->montant, $init_country), 'fees' => $this->toMoney($frais, $init_country), 'code' => wordwrap($code_retrait, 4, ' ', true), 'sender_code' => $user->user_code, 'cart_number' => wordwrap($transaction->numero_carte, 4, ' ', true)]); $this->sendMail($user->email, trans('messages.successful_transaction'), $message); return $this->successResponse($message . trans('messages.sent_by_mail')); diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index 1873908..e1b309d 100755 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -117,7 +117,7 @@ Transaction information: - Number : :id_transaction - Amount of the transaction : :amount - Fees : :fees - - Net withdrawal amount : :net + - Total withdrawal amount : :total - Recipient account : :sender_code - Card number : :cart_number', 'successful_user_remove_from_cart_to_cash' => 'Withdrawing money from your card to cash @@ -126,7 +126,7 @@ Transaction information : - Amount of the transaction: :amount - Fees: :fees - Country of departure: :init_country - - Net withdrawal amount: :net + - Total withdrawal amount: :total - Country of destination: :init_country - User code : :sender_code - Card number : :cart_number diff --git a/resources/lang/fr/messages.php b/resources/lang/fr/messages.php index bed4c43..e088d0a 100755 --- a/resources/lang/fr/messages.php +++ b/resources/lang/fr/messages.php @@ -117,7 +117,7 @@ Informations de la transaction : - Numéro : :id_transaction - Montant de la transaction : :amount - Frais : :fees - - Montant net de retrait: :net + - Montant total de retrait: :total - Compte destinataire : :sender_code - Numero de la carte : :cart_number', 'successful_user_remove_from_cart_to_cash' => 'Retrait d\'argent de votre carte vers cash @@ -126,7 +126,7 @@ Informations de la transaction : - Montant de la transaction : :amount - Frais : :fees - Pays de départ : :init_country - - Montant net de retrait: :net + - Montant total de retrait: :total - Pays de destination : :final_country - Code utilisateur : :sender_code - Numero de la carte : :cart_number