+ Fix bugs v1
This commit is contained in:
parent
c808d02550
commit
35e6fce947
|
@ -490,7 +490,7 @@ class iLinkTransactionController extends Controller
|
||||||
if ($transaction) {
|
if ($transaction) {
|
||||||
//Verifier que le reseau payeur est de type iLink
|
//Verifier que le reseau payeur est de type iLink
|
||||||
if (in_array($transaction->type, [3, 17])) {
|
if (in_array($transaction->type, [3, 17])) {
|
||||||
$configPayeur = ConfigWallet::where('id_network', $request->network_destinataire)->firstOrFail();
|
$configPayeur = ConfigWallet::where('id_network', $transaction->network_destinataire)->firstOrFail();
|
||||||
if ($configPayeur->type != 'ilink')
|
if ($configPayeur->type != 'ilink')
|
||||||
return $this->errorResponse(trans('errors.withdrawal_network_unauthorized'));
|
return $this->errorResponse(trans('errors.withdrawal_network_unauthorized'));
|
||||||
}
|
}
|
||||||
|
@ -1077,14 +1077,14 @@ class iLinkTransactionController extends Controller
|
||||||
'id_wallet_agent' => 'required|integer|min:0|not_in:0',
|
'id_wallet_agent' => 'required|integer|min:0|not_in:0',
|
||||||
]);
|
]);
|
||||||
$transaction = WalletIlinkTransaction::select('nom_destinataire', 'prenom_destinataire', 'type_document_destinataire', 'id_document_destinataire', 'type',
|
$transaction = WalletIlinkTransaction::select('nom_destinataire', 'prenom_destinataire', 'type_document_destinataire', 'id_document_destinataire', 'type',
|
||||||
'id_wallet_user', 'init_country', 'final_country')->where('id_transaction', $request->id_transaction)->first();
|
'id_wallet_user', 'init_country', 'final_country', 'network_destinataire')->where('id_transaction', $request->id_transaction)->first();
|
||||||
|
|
||||||
if (!$transaction)
|
if (!$transaction)
|
||||||
return $this->errorResponse(trans('errors.transaction_not_exist'), Response::HTTP_NOT_FOUND);
|
return $this->errorResponse(trans('errors.transaction_not_exist'), Response::HTTP_NOT_FOUND);
|
||||||
|
|
||||||
//Verifier que le reseau payeur est de type iLink
|
//Verifier que le reseau payeur est de type iLink
|
||||||
if (in_array($transaction->type, [3, 17])) {
|
if (in_array($transaction->type, [3, 17])) {
|
||||||
$configPayeur = ConfigWallet::where('id_network', $request->network_destinataire)->firstOrFail();
|
$configPayeur = ConfigWallet::where('id_network', $transaction->network_destinataire)->firstOrFail();
|
||||||
if ($configPayeur->type != 'ilink')
|
if ($configPayeur->type != 'ilink')
|
||||||
return $this->errorResponse(trans('errors.withdrawal_network_unauthorized'));
|
return $this->errorResponse(trans('errors.withdrawal_network_unauthorized'));
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1104,7 @@ class iLinkTransactionController extends Controller
|
||||||
$data->prenom_destinataire = $transaction->wallet_user->user->firstname;
|
$data->prenom_destinataire = $transaction->wallet_user->user->firstname;
|
||||||
$data->user_code = $transaction->wallet_user->user->user_code;
|
$data->user_code = $transaction->wallet_user->user->user_code;
|
||||||
}
|
}
|
||||||
unset($data->type, $data->init_country, $data->final_country, $data->id_wallet_user);
|
unset($data->type, $data->init_country, $data->final_country, $data->id_wallet_user , $data->network_destinataire);
|
||||||
|
|
||||||
return $this->successResponse($data);
|
return $this->successResponse($data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue