add tables create_customer_accounts

This commit is contained in:
root 2025-10-21 16:26:58 +01:00
parent ed83fc35bc
commit e2562a79eb
4 changed files with 1204 additions and 1020 deletions

View File

@ -13,7 +13,7 @@ DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=iLink_preprod
DB_USERNAME=root
DB_PASSWORD=vps@2017GA
DB_PASSWORD=@iLink@2025
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
@ -26,7 +26,7 @@ TWILIO_SMS_FROM="+447400348273"
MAIL_HOST=mail.ilink-app.com
MAIL_USERNAME=noreply@ilink-app.com
MAIL_PASSWORD=Reply@iLink2022@@@
MAIL_PASSWORD=ijQa[(V2Xm{F2e9SEso}
MAIL_FROM_ADDRESS=noreply@ilink-app.com
MAIL_FROM_NAME="iLink World"
MAIL_ENCRYPTION=tls
@ -35,11 +35,11 @@ VISA_API_URL=10.24.96.5:81
VISA_API_USERNAME=admin
VISA_API_PASSWORD=PasswordHere!
NOTIFICATION_SERVICE_URL=localhost:8083
NOTIFICATION_SERVICE_URL=https://test.ilink-app.com:8083
NOTIFICATION_SERVICE_KEY=RfXvPQzQRgwpzQYPnLfWpZzgx4QseHlg
PAYMENT_SERVICE_URL=localhost:8087
PAYMENT_SERVICE_URL=https://test.ilink-app.com:8087
PAYMENT_SERVICE_KEY=U14YhuyFhweMeYpIYj8Ft2jm4cVgbMzD

View File

@ -659,7 +659,7 @@ class iLinkTransactionController extends Controller
$transaction->frais = $frais = 0;
$transaction->taxe = $taxe = 0;
// $walletUser->balance -= $transaction->montant;
//$walletUser->balance -= $transaction->montant;
//Emettre une trame SSL pour recharger le compte bancaire du montant de la transaction
$transaction->commission_banque = 0;
@ -672,9 +672,9 @@ class iLinkTransactionController extends Controller
$transaction->id_bank = $user->id_bank_country;
$transaction->iban = $user->iban;
$transaction->date = $this->getCurrentTime($init_country);
// $walletUser->save();
//$walletUser->save();
$transaction->id_transaction = $this->getTransactionID();
// $transaction->save();
//$transaction->save();
Log::info('-------------------------- User - Envoi de wallet à banque ------------------------------------');
Log::info(json_encode($transaction));
@ -688,14 +688,14 @@ class iLinkTransactionController extends Controller
$response_message = ($message . trans('messages.sent_by_mail'));
break;
// case 5: //User - Envoi de carte à wallet
// $frais =$montant * $config->taux_com_user_carte_wallet / 100;
//// $taxe = ($init_country != $final_country) ? $this->calculateTax($taxesInternationales , $frais) : $this->calculateTax($taxesNationales ,$frais);
// break;
// case 6: //User - Envoi de carte à cash
// $frais =$montant * $config->taux_com_user_carte_cash / 100;
//// $taxe = ($init_country != $final_country) ? $this->calculateTax($taxesInternationales , $frais) : $this->calculateTax($taxesNationales ,$frais);
// break;
// case 5: //User - Envoi de carte à wallet
// $frais =$montant * $config->taux_com_user_carte_wallet / 100;
//// $taxe = ($init_country != $final_country) ? $this->calculateTax($taxesInternationales , $frais) : $this->calculateTax($taxesNationales ,$frais);
// break;
// case 6: //User - Envoi de carte à cash
// $frais =$montant * $config->taux_com_user_carte_cash / 100;
//// $taxe = ($init_country != $final_country) ? $this->calculateTax($taxesInternationales , $frais) : $this->calculateTax($taxesNationales ,$frais);
// break;
case 9: // User - Retrait de wallet en cash
$user = $walletUser->user;
$this->validatePassword($request->password, $user->encrypted_password, $user->salt);
@ -943,9 +943,9 @@ class iLinkTransactionController extends Controller
$emetteur = $transaction->wallet_user ? $transaction->wallet_user->user->lastname . ' ' . $transaction->wallet_user->user->firstname : $transaction->prenom_emetteur . ' ' . $transaction->nom_emetteur;
$destinataire = in_array($transaction->type, [9, 11]) ? $emetteur : $transaction->prenom_destinataire . ' ' . $transaction->nom_destinataire;
// $transactionRetrait->commission_ag = floatval($commissionHyp * $config->taux_com_ag_retrait_cash / 100);
// $transactionRetrait->commission_sup = floatval($commissionHyp * $config->taux_com_sup_retrait_cash / 100);
// $transactionRetrait->commission_hyp = $commissionHyp - $transactionRetrait->commission_ag - $transactionRetrait->commission_sup;
//$transactionRetrait->commission_ag = floatval($commissionHyp * $config->taux_com_ag_retrait_cash / 100);
// $transactionRetrait->commission_sup = floatval($commissionHyp * $config->taux_com_sup_retrait_cash / 100);
// $transactionRetrait->commission_hyp = $commissionHyp - $transactionRetrait->commission_ag - $transactionRetrait->commission_sup;
// Commissions
$final_country = $transaction->final_country;
@ -1009,17 +1009,17 @@ class iLinkTransactionController extends Controller
$transaction->expiration_date = $expiration_date;
$transaction->final_country = $init_country;
// $final_country = $request->final_country;
//$final_country = $request->final_country;
$plr_customer_cart_cash_national = $this->getPaliers($paliers_commission_wallets, 'customer_cart_cash_national');
// $plr_customer_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'customer_cart_cash_international');
//$plr_customer_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'customer_cart_cash_international');
$plr_agent_cart_cash_national = $this->getPaliers($paliers_commission_wallets, 'agent_cart_cash_national');
// $plr_agent_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'agent_cart_cash_international');
//$plr_agent_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'agent_cart_cash_international');
$plr_sup_cart_cash_national = $this->getPaliers($paliers_commission_wallets, 'sup_cart_cash_national');
// $plr_sup_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'sup_cart_cash_international');
//$plr_sup_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'sup_cart_cash_international');
$plr_hyp_cart_cash_national = $this->getPaliers($paliers_commission_wallets, 'hyp_cart_cash_national');
// $plr_hyp_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'hyp_cart_cash_international');
//$plr_hyp_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'hyp_cart_cash_international');
$plr_bank_cart_cash_national = $this->getPaliers($paliers_commission_wallets, 'bank_cart_cash_national');
// $plr_bank_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'bank_cart_cash_international');
//$plr_bank_cart_cash_international = $this->getPaliers($paliers_commission_wallets, 'bank_cart_cash_international');
$frais = $this->calculateFees($plr_customer_cart_cash_national, $request->montant);
$fees = $this->getBasicTransactionFees([
@ -1186,8 +1186,8 @@ class iLinkTransactionController extends Controller
$reseauPayeur->balance_com += $transaction->part_reseau_payeur_final_country;
//Emettre une trame securise pour crediter le wallet utilisateur
// $walletUser->balance += $transaction->montant_net_final_country;
// $transaction->id_destinataire = r
//$walletUser->balance += $transaction->montant_net_final_country;
//$transaction->id_destinataire = r
$countryCurrency = CountriesCurrency::findOrFail($request->final_country);
// PayOut through payment service
@ -1256,17 +1256,17 @@ class iLinkTransactionController extends Controller
$transaction->expiration_date = $expiration_date;
$transaction->final_country = $init_country;
// $final_country = $request->final_country;
//$final_country = $request->final_country;
$plr_customer_cash_cart_national = $this->getPaliers($paliers_commission_wallets, 'customer_cash_cart_national');
// $plr_customer_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'customer_cash_cart_international');
//$plr_customer_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'customer_cash_cart_international');
$plr_agent_cash_cart_national = $this->getPaliers($paliers_commission_wallets, 'agent_cash_cart_national');
// $plr_agent_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'agent_cash_cart_international');
//$plr_agent_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'agent_cash_cart_international');
$plr_sup_cash_cart_national = $this->getPaliers($paliers_commission_wallets, 'sup_cash_cart_national');
// $plr_sup_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'sup_cash_cart_international');
//$plr_sup_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'sup_cash_cart_international');
$plr_hyp_cash_cart_national = $this->getPaliers($paliers_commission_wallets, 'hyp_cash_cart_national');
// $plr_hyp_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'hyp_cash_cart_international');
//$plr_hyp_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'hyp_cash_cart_international');
$plr_bank_cash_cart_national = $this->getPaliers($paliers_commission_wallets, 'bank_cash_cart_national');
// $plr_bank_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'bank_cash_cart_international');
//$plr_bank_cash_cart_international = $this->getPaliers($paliers_commission_wallets, 'bank_cash_cart_international');
$frais = $this->calculateFees($plr_customer_cash_cart_national, $request->montant);
$fees = $this->getBasicTransactionFees([
@ -1581,7 +1581,7 @@ class iLinkTransactionController extends Controller
$transaction->frais = $frais = 0;
$transaction->taxe = $taxe = 0;
// $walletUser->balance -= $transaction->montant;
//$walletUser->balance -= $transaction->montant;
//Emettre une trame SSL pour recharger le compte bancaire du montant de la transaction
$transaction->commission_banque = 0;
@ -1598,9 +1598,9 @@ class iLinkTransactionController extends Controller
$transaction->country = $network_bank->network->country->name;
$transaction->id_bank = $request->id_bank;
$transaction->iban = $request->iban;
// $walletUser->save();
//$walletUser->save();
$transaction->id_transaction = $this->getTransactionID();
// $transaction->save();
//$transaction->save();
Log::info('-------------------------- Agent - Envoi de cash vers banque ------------------------------------');
Log::info(json_encode($transaction));
@ -1687,7 +1687,7 @@ class iLinkTransactionController extends Controller
$transaction->frais = $frais = 0;
$transaction->taxe = $taxe = 0;
// $walletUser->balance -= $transaction->montant;
//$walletUser->balance -= $transaction->montant;
//Emettre une trame SSL pour recharger l'api de l'operateur du montant de la transaction
$transaction->commission_hyp = 0;
@ -1701,9 +1701,9 @@ class iLinkTransactionController extends Controller
$transaction->country = $network_bank->network->country->name;
$transaction->id_operator = $request->id_operator;
$transaction->no_facture = $request->no_facture;
// $walletUser->save();
//$walletUser->save();
$transaction->id_transaction = $this->getTransactionID();
// $transaction->save();
//$transaction->save();
Log::info('-------------------------- User - Payer une facture chez un operateur ------------------------------------');
Log::info(json_encode($transaction));
@ -1745,9 +1745,9 @@ class iLinkTransactionController extends Controller
*/
case 20: //User - Retrait de la banque vers le wallet
// $this->validate($request, [
// 'code_retrait' => 'required',
// ]);
//$this->validate($request, [
//'code_retrait' => 'required',
//]);
$user = $walletUser->user;
$this->validatePassword($request->password, $user->encrypted_password, $user->salt);
@ -1782,7 +1782,7 @@ class iLinkTransactionController extends Controller
$transaction->frais = $frais = 0;
$transaction->taxe = $taxe = 0;
// $walletUser->balance += $transaction->montant;
//$walletUser->balance += $transaction->montant;
$transaction->commission_banque = 0;
$transaction->commission_hyp = 0;
@ -1794,9 +1794,9 @@ class iLinkTransactionController extends Controller
$transaction->country = $user->bank->network->country->name;
$transaction->id_bank = $user->id_bank_country;
$transaction->iban = $user->iban;
// $walletUser->save();
//$walletUser->save();
$transaction->id_transaction = $this->getTransactionID();
// $transaction->save();
//$transaction->save();
Log::info('-------------------------- User - Retrait de la banque vers le wallet ------------------------------------');
Log::info(json_encode($transaction));

2079
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomerAccountTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// Table principale : customer_account_types
Schema::create('customer_account_types', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description')->nullable();
$table->unsignedBigInteger('parent_id')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('parent_id')
->references('id')
->on('customer_account_types')
->onDelete('set null');
});
// Table liée : customer_account_type_documents
Schema::create('customer_account_type_documents', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('account_type_id');
$table->string('document_name');
$table->boolean('is_mandatory')->default(false);
$table->text('description')->nullable();
$table->timestamps();
$table->foreign('account_type_id')
->references('id')
->on('customer_account_types')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customer_account_type_documents');
Schema::dropIfExists('customer_account_types');
}
}