+ Fix iLinkTransactionController card transaction v3

This commit is contained in:
Djery-Tom 2020-10-08 14:24:16 +01:00
parent 16e9a0e634
commit 648d45cc4b
3 changed files with 8 additions and 9 deletions

View File

@ -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'));

View File

@ -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

View File

@ -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