+ Fix iLinkTransactionController card transaction v3
This commit is contained in:
parent
16e9a0e634
commit
648d45cc4b
|
@ -238,7 +238,6 @@ class iLinkTransactionController extends Controller
|
||||||
$body['amount'] = $montantDepot;
|
$body['amount'] = $montantDepot;
|
||||||
$identification = Identification::where('id_user', $user->id)->first();
|
$identification = Identification::where('id_user', $user->id)->first();
|
||||||
$body['cardholder_name'] = $identification ? $identification->lastname . ' ' . $identification->firstname : $user->lastname . ' ' . $user->firstname; //"John Smith" ;
|
$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['currency'] = $this->getCurrency($init_country);
|
||||||
$body['ref'] = date("Y-m-d H:i:s.u");
|
$body['ref'] = date("Y-m-d H:i:s.u");
|
||||||
|
|
||||||
|
@ -468,7 +467,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->save();
|
$transaction->save();
|
||||||
$message = trans('messages.successful_user_remove_from_cart_to_wallet',
|
$message = trans('messages.successful_user_remove_from_cart_to_wallet',
|
||||||
['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country),
|
['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)]);
|
'sender_code' => $user->user_code, 'cart_number' => wordwrap($transaction->numero_carte, 4, ' ', true)]);
|
||||||
$this->sendMail($user->email, trans('messages.successful_transaction'), $message);
|
$this->sendMail($user->email, trans('messages.successful_transaction'), $message);
|
||||||
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
||||||
|
@ -497,8 +496,8 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->final_country = $init_country;
|
$transaction->final_country = $init_country;
|
||||||
|
|
||||||
$frais = $request->montant * $config->taux_com_user_carte_cash / 100;
|
$frais = $request->montant * $config->taux_com_user_carte_cash / 100;
|
||||||
$transaction->montant_net_final_country = $transaction->montant_net = $transaction->montant;
|
$transaction->montant_net = $montantRetrait = $transaction->montant + $frais;
|
||||||
$montantRetrait = $transaction->montant + $frais;
|
$transaction->montant_net_final_country = $transaction->montant;
|
||||||
// $body['amount'] = $this->toUSDAmount($montantRetrait, $init_country);
|
// $body['amount'] = $this->toUSDAmount($montantRetrait, $init_country);
|
||||||
$body['card_number'] = $user->numero_carte;
|
$body['card_number'] = $user->numero_carte;
|
||||||
$body['cvv'] = $request->cvv;
|
$body['cvv'] = $request->cvv;
|
||||||
|
@ -537,7 +536,7 @@ class iLinkTransactionController extends Controller
|
||||||
$message = trans('messages.successful_user_remove_from_cart_to_cash',
|
$message = trans('messages.successful_user_remove_from_cart_to_cash',
|
||||||
['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country),
|
['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country),
|
||||||
'final_country' => $this->getCountryName($init_country), 'init_country' => $this->getCountryName($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)]);
|
'sender_code' => $user->user_code, 'cart_number' => wordwrap($transaction->numero_carte, 4, ' ', true)]);
|
||||||
$this->sendMail($user->email, trans('messages.successful_transaction'), $message);
|
$this->sendMail($user->email, trans('messages.successful_transaction'), $message);
|
||||||
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
||||||
|
|
|
@ -117,7 +117,7 @@ Transaction information:
|
||||||
- Number : :id_transaction
|
- Number : :id_transaction
|
||||||
- Amount of the transaction : :amount
|
- Amount of the transaction : :amount
|
||||||
- Fees : :fees
|
- Fees : :fees
|
||||||
- Net withdrawal amount : :net
|
- Total withdrawal amount : :total
|
||||||
- Recipient account : :sender_code
|
- Recipient account : :sender_code
|
||||||
- Card number : :cart_number',
|
- Card number : :cart_number',
|
||||||
'successful_user_remove_from_cart_to_cash' => 'Withdrawing money from your card to cash
|
'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
|
- Amount of the transaction: :amount
|
||||||
- Fees: :fees
|
- Fees: :fees
|
||||||
- Country of departure: :init_country
|
- Country of departure: :init_country
|
||||||
- Net withdrawal amount: :net
|
- Total withdrawal amount: :total
|
||||||
- Country of destination: :init_country
|
- Country of destination: :init_country
|
||||||
- User code : :sender_code
|
- User code : :sender_code
|
||||||
- Card number : :cart_number
|
- Card number : :cart_number
|
||||||
|
|
|
@ -117,7 +117,7 @@ Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de la transaction : :amount
|
- Montant de la transaction : :amount
|
||||||
- Frais : :fees
|
- Frais : :fees
|
||||||
- Montant net de retrait: :net
|
- Montant total de retrait: :total
|
||||||
- Compte destinataire : :sender_code
|
- Compte destinataire : :sender_code
|
||||||
- Numero de la carte : :cart_number',
|
- Numero de la carte : :cart_number',
|
||||||
'successful_user_remove_from_cart_to_cash' => 'Retrait d\'argent de votre carte vers cash
|
'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
|
- Montant de la transaction : :amount
|
||||||
- Frais : :fees
|
- Frais : :fees
|
||||||
- Pays de départ : :init_country
|
- Pays de départ : :init_country
|
||||||
- Montant net de retrait: :net
|
- Montant total de retrait: :total
|
||||||
- Pays de destination : :final_country
|
- Pays de destination : :final_country
|
||||||
- Code utilisateur : :sender_code
|
- Code utilisateur : :sender_code
|
||||||
- Numero de la carte : :cart_number
|
- Numero de la carte : :cart_number
|
||||||
|
|
Loading…
Reference in New Issue