+ Update errors messages
This commit is contained in:
parent
6c0529923b
commit
177c5140e2
|
@ -26,7 +26,8 @@ class WalletController extends Controller
|
||||||
|
|
||||||
public function activated($id_agent)
|
public function activated($id_agent)
|
||||||
{
|
{
|
||||||
$networks = DB::select('SELECT ne.name as network , countries.name AS country, w.id, w.balance_princ , w.balance_com, w.created_date, na.id AS id_networkAgent , cw.taux_com_client_depot , na.id AS id_networkAgent , cg.category FROM agents ag
|
$networks = DB::select('SELECT ne.name as network , countries.name AS country, w.id, w.balance_princ , w.balance_com, w.created_date, cw.type,
|
||||||
|
na.id AS id_networkAgent , cw.taux_com_client_depot , na.id AS id_networkAgent , cg.category FROM agents ag
|
||||||
INNER JOIN networks_agents na ON ag.id=na.agent_id INNER JOIN codeGenerer cg ON cg.id=na.codeGenerer_id INNER JOIN networks ne ON ne.id=na.network_id INNER JOIN configWallet cw ON ne.id = cw.id_network
|
INNER JOIN networks_agents na ON ag.id=na.agent_id INNER JOIN codeGenerer cg ON cg.id=na.codeGenerer_id INNER JOIN networks ne ON ne.id=na.network_id INNER JOIN configWallet cw ON ne.id = cw.id_network
|
||||||
INNER JOIN countries ON ne.country_id=countries.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN (
|
INNER JOIN countries ON ne.country_id=countries.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN (
|
||||||
SELECT networks.id FROM networks LEFT JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND id_network IS NOT NULL)', ['id' => $id_agent]);
|
SELECT networks.id FROM networks LEFT JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND id_network IS NOT NULL)', ['id' => $id_agent]);
|
||||||
|
@ -74,7 +75,7 @@ class WalletController extends Controller
|
||||||
public function show($id_wallet)
|
public function show($id_wallet)
|
||||||
{
|
{
|
||||||
// $wallet = Wallet::findOrFail($id_wallet);
|
// $wallet = Wallet::findOrFail($id_wallet);
|
||||||
$wallet = collect(DB::select('SELECT wa.wallet_id AS id, wa.balance_princ, wa.balance_com, wa.created_date, wa.network , cw.taux_com_client_depot, c.name AS country,
|
$wallet = collect(DB::select('SELECT wa.wallet_id AS id, wa.balance_princ, wa.balance_com, wa.created_date, wa.network , cw.taux_com_client_depot, c.name AS country, cw.type,
|
||||||
c.currency_code FROM wallet_agent wa INNER JOIN configWallet cw ON wa.network_id = cw.id_network INNER JOIN networks n ON n.id = wa.network_id
|
c.currency_code FROM wallet_agent wa INNER JOIN configWallet cw ON wa.network_id = cw.id_network INNER JOIN networks n ON n.id = wa.network_id
|
||||||
INNER JOIN countries_currencies c ON c.id = n.country_id
|
INNER JOIN countries_currencies c ON c.id = n.country_id
|
||||||
WHERE wa.wallet_id = :id',['id' => $id_wallet]))->first();
|
WHERE wa.wallet_id = :id',['id' => $id_wallet]))->first();
|
||||||
|
|
|
@ -441,7 +441,7 @@ 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 = $montantRetrait = $transaction->montant - $frais;
|
$transaction->montant_net_final_country = $transaction->montant_net = $montantRetrait = $transaction->montant - $frais;
|
||||||
$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;
|
||||||
|
@ -470,6 +470,7 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->save();
|
$transaction->save();
|
||||||
$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),
|
||||||
'net' => $this->toMoney($montantRetrait, $init_country), 'fees' => $this->toMoney($frais, $init_country), 'code' => wordwrap($code_retrait, 4, ' ', true),
|
'net' => $this->toMoney($montantRetrait, $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);
|
||||||
|
@ -537,8 +538,9 @@ class iLinkTransactionController extends Controller
|
||||||
$transaction->save();
|
$transaction->save();
|
||||||
$transactionRetrait->save();
|
$transactionRetrait->save();
|
||||||
$message = trans('messages.successful_agent_remove_cash',
|
$message = trans('messages.successful_agent_remove_cash',
|
||||||
['id_transaction' => $transactionRetrait->id_transaction, 'amount' => $this->toMoney($request->montant, $init_country),
|
['id_transaction' => $transactionRetrait->id_transaction, 'amount' => $this->toMoney($request->montant, $init_country),'init_country' => $this->getCountryName($init_country),
|
||||||
'code' => wordwrap($request->code_retrait, 4, ' ', true), 'id_transaction_retrait' => $transaction->id_transaction]);
|
'code' => wordwrap($request->code_retrait, 4, ' ', true), 'final_country' => $this->getCountryName($transaction->final_country),
|
||||||
|
'id_transaction_retrait' => $transaction->id_transaction]);
|
||||||
$this->sendMail($emailEmetteur, trans('messages.successful_transaction'), $message);
|
$this->sendMail($emailEmetteur, trans('messages.successful_transaction'), $message);
|
||||||
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
return $this->successResponse($message . trans('messages.sent_by_mail'));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1202,7 +1204,7 @@ class iLinkTransactionController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generateTransactionCode($length = 12) {
|
private function generateTransactionCode($length = 12) {
|
||||||
$characters = '23456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';
|
$characters = '23456789ABCDEFGHJKLMNOPQRSTUVWXYZ';
|
||||||
$charactersLength = strlen($characters);
|
$charactersLength = strlen($characters);
|
||||||
$randomString = '';
|
$randomString = '';
|
||||||
for ($i = 0; $i < $length; $i++) {
|
for ($i = 0; $i < $length; $i++) {
|
||||||
|
|
|
@ -120,8 +120,18 @@ Transaction information :
|
||||||
- Number: :id_transaction
|
- Number: :id_transaction
|
||||||
- Amount of the transaction: :amount
|
- Amount of the transaction: :amount
|
||||||
- Fees: :fees
|
- Fees: :fees
|
||||||
|
- Country of departure: :init_country
|
||||||
- Net withdrawal amount: :net
|
- Net withdrawal amount: :net
|
||||||
|
- Country of destination: :init_country
|
||||||
- User code : :sender_code
|
- User code : :sender_code
|
||||||
- Card number : :cart_number
|
- Card number : :cart_number
|
||||||
- Withdrawal code : :code',
|
- Withdrawal code : :code',
|
||||||
|
'successful_agent_remove_cash'=>'Withdrawal of money from a geolocated agent
|
||||||
|
Transaction information :
|
||||||
|
- Number : :id_transaction
|
||||||
|
- Withdrawal amount : :amount
|
||||||
|
- Withdrawal transaction number : :id_transaction_retrait
|
||||||
|
- Withdrawal code : :code
|
||||||
|
- Country of departure : :init_country
|
||||||
|
- Country of destination : :final_country',
|
||||||
];
|
];
|
||||||
|
|
|
@ -120,7 +120,9 @@ 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
|
||||||
|
- Pays de départ : :init_country
|
||||||
- Montant net de retrait: :net
|
- Montant net de retrait: :net
|
||||||
|
- 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
|
||||||
- Code de retrait : :code',
|
- Code de retrait : :code',
|
||||||
|
@ -129,5 +131,7 @@ Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de retrait : :amount
|
- Montant de retrait : :amount
|
||||||
- Numero de transaction de retrait : :id_transaction_retrait
|
- Numero de transaction de retrait : :id_transaction_retrait
|
||||||
- Code de retrait : :code'
|
- Code de retrait : :code
|
||||||
|
- Pays de départ : :init_country
|
||||||
|
- Pays de destination : :final_country'
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue