fix: transaction email response
This commit is contained in:
parent
d0ba85c207
commit
c4ab2831a0
|
@ -250,9 +250,6 @@ class iLinkTransactionController extends Controller
|
||||||
try {
|
try {
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
$transaction->exchange_rate = $this->getExchangeRate($init_country, $final_country ?? $init_country);
|
|
||||||
|
|
||||||
|
|
||||||
switch ($type->id) {
|
switch ($type->id) {
|
||||||
case 1: //User - Envoi wallet à wallet
|
case 1: //User - Envoi wallet à wallet
|
||||||
$this->validate($request, $transaction->send_wallet_wallet_rules());
|
$this->validate($request, $transaction->send_wallet_wallet_rules());
|
||||||
|
@ -312,6 +309,8 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->type_id_destinataire = $request->input('type_id_destinataire');
|
$transaction->type_id_destinataire = $request->input('type_id_destinataire');
|
||||||
$transaction->nom_destinataire = $request->nom_destinataire;
|
$transaction->nom_destinataire = $request->nom_destinataire;
|
||||||
$transaction->prenom_destinataire = $request->prenom_destinataire;
|
$transaction->prenom_destinataire = $request->prenom_destinataire;
|
||||||
|
$transaction->exchange_rate = $this->getExchangeRate($init_country, $final_country);
|
||||||
|
|
||||||
if ($configPayeur->type == 'ilink') {
|
if ($configPayeur->type == 'ilink') {
|
||||||
$destinataire = $this->verifyiLinkRecipient($request->id_destinataire, $request->final_country);
|
$destinataire = $this->verifyiLinkRecipient($request->id_destinataire, $request->final_country);
|
||||||
if(!($destinataire instanceof User)){
|
if(!($destinataire instanceof User)){
|
||||||
|
@ -424,6 +423,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->frais = $frais;
|
$transaction->frais = $frais;
|
||||||
$transaction->montant_net = $montantDepot = $transaction->montant - $frais - $taxe;
|
$transaction->montant_net = $montantDepot = $transaction->montant - $frais - $taxe;
|
||||||
$transaction->montant_net_final_country = $this->toMoneyAmount($montantDepot, $init_country, $final_country);
|
$transaction->montant_net_final_country = $this->toMoneyAmount($montantDepot, $init_country, $final_country);
|
||||||
|
$transaction->exchange_rate = $this->getExchangeRate($init_country, $final_country);
|
||||||
|
|
||||||
$identification = Identification::with(['country'])->where('id_user', $user->id)->first();
|
$identification = Identification::with(['country'])->where('id_user', $user->id)->first();
|
||||||
$countryCurrency = CountriesCurrency::findOrFail($final_country);
|
$countryCurrency = CountriesCurrency::findOrFail($final_country);
|
||||||
|
@ -765,6 +765,8 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->frais = $frais;
|
$transaction->frais = $frais;
|
||||||
$transaction->montant_net = $transaction->montant + ($frais + $taxe); // Montant de retrait
|
$transaction->montant_net = $transaction->montant + ($frais + $taxe); // Montant de retrait
|
||||||
$transaction->montant_net_final_country = $this->toMoneyAmount($transaction->montant, $init_country, $final_country);
|
$transaction->montant_net_final_country = $this->toMoneyAmount($transaction->montant, $init_country, $final_country);
|
||||||
|
$transaction->exchange_rate = $this->getExchangeRate($init_country, $final_country);
|
||||||
|
|
||||||
|
|
||||||
$identification = Identification::where('id_user', $user->id)->first();
|
$identification = Identification::where('id_user', $user->id)->first();
|
||||||
$countryCurrency = CountriesCurrency::findOrFail($init_country);
|
$countryCurrency = CountriesCurrency::findOrFail($init_country);
|
||||||
|
@ -847,6 +849,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->frais = $frais;
|
$transaction->frais = $frais;
|
||||||
$transaction->montant_net = $transaction->montant + ($frais + $taxe); // Montant de retrait
|
$transaction->montant_net = $transaction->montant + ($frais + $taxe); // Montant de retrait
|
||||||
$transaction->montant_net_final_country = $this->toMoneyAmount($transaction->montant, $init_country, $final_country);
|
$transaction->montant_net_final_country = $this->toMoneyAmount($transaction->montant, $init_country, $final_country);
|
||||||
|
$transaction->exchange_rate = $this->getExchangeRate($init_country, $final_country);
|
||||||
|
|
||||||
$countryCurrency = CountriesCurrency::findOrFail($init_country);
|
$countryCurrency = CountriesCurrency::findOrFail($init_country);
|
||||||
$identification = Identification::where('id_user', $user->id)->first();
|
$identification = Identification::where('id_user', $user->id)->first();
|
||||||
|
@ -1906,6 +1909,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->commission_hyp = $transaction->part_reseau_emetteur;
|
$transaction->commission_hyp = $transaction->part_reseau_emetteur;
|
||||||
$transaction->id_transaction = $this->getTransactionID();
|
$transaction->id_transaction = $this->getTransactionID();
|
||||||
$transaction->type_id_destinataire = $request->input('type_id_destinataire');
|
$transaction->type_id_destinataire = $request->input('type_id_destinataire');
|
||||||
|
$transaction->exchange_rate = $this->getExchangeRate($init_country, $request->final_country);
|
||||||
|
|
||||||
|
|
||||||
// Verifier si le reseau payeur existe si c'est pas un reseau ilink
|
// Verifier si le reseau payeur existe si c'est pas un reseau ilink
|
||||||
|
@ -2002,7 +2006,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->save();
|
$transaction->save();
|
||||||
$message = trans('messages.successful_user_remove_from_cart_to_other_wallet',
|
$message = trans('messages.successful_user_remove_from_cart_to_other_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),
|
||||||
'total' => $this->toMoney($montantRetrait, $init_country), 'fees' => $this->toMoney($frais, $init_country),
|
'total' => $this->toMoney($montantRetrait, $init_country), 'fees' => $this->toMoney($frais, $init_country),'init_country' => $this->getCountryName($init_country), 'final_country' => $this->getCountryName($request->final_country),
|
||||||
'sender_code' => $transaction->id_destinataire, 'cart_number' => wordwrap($transaction->numero_carte, 4, ' ', true)]);
|
'sender_code' => $transaction->id_destinataire, '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);
|
||||||
$response_message = ($message . trans('messages.sent_by_mail'));
|
$response_message = ($message . trans('messages.sent_by_mail'));
|
||||||
|
|
|
@ -128,7 +128,7 @@ Transaction information:
|
||||||
- Card number: :cart_number
|
- Card number: :cart_number
|
||||||
- Country of destination: :final_country
|
- Country of destination: :final_country
|
||||||
- Recipient account:: sender_code
|
- Recipient account:: sender_code
|
||||||
- Net amount: :net_final",
|
- Amount: :net_final",
|
||||||
'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
|
||||||
Transaction information:
|
Transaction information:
|
||||||
- Number: :id_transaction
|
- Number: :id_transaction
|
||||||
|
@ -138,7 +138,7 @@ Transaction information:
|
||||||
- Amount incl. VAT: :net_init
|
- Amount incl. VAT: :net_init
|
||||||
- Card number: :cart_number
|
- Card number: :cart_number
|
||||||
- Country of destination: :final_country
|
- Country of destination: :final_country
|
||||||
- Net amount: :net_final,
|
- Amount: :net_final,
|
||||||
- User code: :sender_code
|
- User code: :sender_code
|
||||||
- Withdrawal code: :code",
|
- Withdrawal code: :code",
|
||||||
'successful_agent_remove_cash' => 'Withdrawal of money from a geolocated agent
|
'successful_agent_remove_cash' => 'Withdrawal of money from a geolocated agent
|
||||||
|
@ -324,9 +324,12 @@ Transaction Information:
|
||||||
'successful_user_remove_from_cart_to_other_wallet' => "Withdraw money from your card to another account
|
'successful_user_remove_from_cart_to_other_wallet' => "Withdraw money from your card to another account
|
||||||
Transaction information :
|
Transaction information :
|
||||||
- Number: :id_transaction
|
- Number: :id_transaction
|
||||||
- Transaction amount: :amount
|
- Amount : :amount
|
||||||
- Fees: :fees
|
- Fees and taxes: :fees
|
||||||
- Total withdrawal amount: :total
|
- Country of card issue: :init_country
|
||||||
- Recipient account: :sender_code
|
- Amount incl. VAT: :total
|
||||||
- Card number: :cart_number"
|
- Card number: :cart_number
|
||||||
|
- Country of destination: :final_country
|
||||||
|
- Destination account: :sender_code
|
||||||
|
- Amount: :net_final"
|
||||||
];
|
];
|
||||||
|
|
|
@ -128,7 +128,7 @@ Informations de la transaction :
|
||||||
- Numéro de la carte : :cart_number
|
- Numéro de la carte : :cart_number
|
||||||
- Pays de destination : :final_country
|
- Pays de destination : :final_country
|
||||||
- Compte destinataire : :sender_code
|
- Compte destinataire : :sender_code
|
||||||
- Montant net : :net_final",
|
- Montant : :net_final",
|
||||||
'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
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
|
@ -138,7 +138,7 @@ Informations de la transaction :
|
||||||
- Montant TTC : :net_init
|
- Montant TTC : :net_init
|
||||||
- Numéro de la carte : :cart_number
|
- Numéro de la carte : :cart_number
|
||||||
- Pays de destination : :final_country
|
- Pays de destination : :final_country
|
||||||
- Montant net : :net_final,
|
- Montant : :net_final,
|
||||||
- Code utilisateur : :sender_code
|
- Code utilisateur : :sender_code
|
||||||
- Code de retrait : :code",
|
- Code de retrait : :code",
|
||||||
'successful_agent_remove_cash' => 'Retrait d\'argent chez un agent géolocalisé
|
'successful_agent_remove_cash' => 'Retrait d\'argent chez un agent géolocalisé
|
||||||
|
@ -325,9 +325,12 @@ Informations de la transaction :
|
||||||
'successful_user_remove_from_cart_to_other_wallet' => "Retrait d'argent de votre carte vers un autre compte
|
'successful_user_remove_from_cart_to_other_wallet' => "Retrait d'argent de votre carte vers un autre compte
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de la transaction : :amount
|
- Montant : :amount
|
||||||
- Frais : :fees
|
- Frais et taxes : :fees
|
||||||
- Montant total de retrait: :total
|
- Pays d'émission de la carte : :init_country
|
||||||
|
- Montant TTC : :total
|
||||||
|
- Numéro de la carte : :cart_number
|
||||||
|
- Pays de destination : :final_country
|
||||||
- Compte destinataire : :sender_code
|
- Compte destinataire : :sender_code
|
||||||
- Numero de la carte : :cart_number"
|
- Montant : :net_final",
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue