+ Timezone of dates is now providing by user
This commit is contained in:
		
							parent
							
								
									152b0987e2
								
							
						
					
					
						commit
						749dcc4471
					
				|  | @ -2,21 +2,16 @@ | ||||||
| 
 | 
 | ||||||
| namespace App\Http\Controllers; | namespace App\Http\Controllers; | ||||||
| 
 | 
 | ||||||
| use App\Models\ConfigWallet; |  | ||||||
| use App\Models\Network; |  | ||||||
| use App\Models\NetworksAgent; |  | ||||||
| use App\Models\TransfertCommissionTransaction; | use App\Models\TransfertCommissionTransaction; | ||||||
| use App\Models\Wallet; | use App\Models\Wallet; | ||||||
| use App\Models\WalletTransaction; |  | ||||||
| use App\Traits\ApiResponser; | use App\Traits\ApiResponser; | ||||||
| use Illuminate\Http\Request; | use App\Traits\Helper; | ||||||
| use Illuminate\Http\Response; | use Illuminate\Http\Response; | ||||||
| use Illuminate\Support\Facades\Date; |  | ||||||
| use Illuminate\Support\Facades\Mail; |  | ||||||
| 
 | 
 | ||||||
| class CommissionController extends Controller | class CommissionController extends Controller | ||||||
| { | { | ||||||
|     use ApiResponser; |     use ApiResponser; | ||||||
|  |     use Helper; | ||||||
|     /** |     /** | ||||||
|      * Create a new controller instance. |      * Create a new controller instance. | ||||||
|      * |      * | ||||||
|  | @ -42,7 +37,7 @@ class CommissionController extends Controller | ||||||
|         $transaction->balance_princ_final = $wallet->balance_princ; |         $transaction->balance_princ_final = $wallet->balance_princ; | ||||||
|         $transaction->balance_com_final = $wallet->balance_com; |         $transaction->balance_com_final = $wallet->balance_com; | ||||||
|         $transaction->id_wallet_ag = $wallet->id; |         $transaction->id_wallet_ag = $wallet->id; | ||||||
|         $transaction->date = new \DateTime(); |         $transaction->date = $this->getCurrentTime($wallet->networks_agent->network->country_id); | ||||||
|         $wallet->save(); |         $wallet->save(); | ||||||
|         $transaction->save(); |         $transaction->save(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -42,6 +42,7 @@ class CreditController extends Controller | ||||||
| 
 | 
 | ||||||
|         $walletAgent = Wallet::where('id_networkAgent',$demand->network_agent_id)->firstOrFail(); |         $walletAgent = Wallet::where('id_networkAgent',$demand->network_agent_id)->firstOrFail(); | ||||||
|         $walletParrain = Wallet::findOrFail($walletAgentParrain->wallet_id); |         $walletParrain = Wallet::findOrFail($walletAgentParrain->wallet_id); | ||||||
|  |         $datetime = $this->getCurrentTime($walletAgent->networks_agent->network->country_id); | ||||||
| 
 | 
 | ||||||
|         if(isset($request->montant)){ |         if(isset($request->montant)){ | ||||||
|             $rules = [ |             $rules = [ | ||||||
|  | @ -55,7 +56,7 @@ class CreditController extends Controller | ||||||
|             $walletAgent->balance_princ += $request->montant; |             $walletAgent->balance_princ += $request->montant; | ||||||
|             $walletParrain->balance_princ -= $request->montant; |             $walletParrain->balance_princ -= $request->montant; | ||||||
| 
 | 
 | ||||||
|             DB::update('UPDATE demandeCredits SET montant = ? , `status` = \'1\' , date_modification = CURRENT_TIMESTAMP WHERE ( id = ? );',[$request->montant,$demand->id]); |             DB::update('UPDATE demandeCredits SET montant = ? , `status` = \'1\' , date_modification = ? , date_creation = ? WHERE ( id = ? );', [$request->montant, $datetime, $datetime, $demand->id]); | ||||||
|         }else{ |         }else{ | ||||||
|             if($walletParrain->balance_princ < $demand->montant) |             if($walletParrain->balance_princ < $demand->montant) | ||||||
|                 return $this->errorResponse(trans('messages.princ_balance_inf_to_demand_amount'),Response::HTTP_UPGRADE_REQUIRED); |                 return $this->errorResponse(trans('messages.princ_balance_inf_to_demand_amount'),Response::HTTP_UPGRADE_REQUIRED); | ||||||
|  | @ -63,7 +64,7 @@ class CreditController extends Controller | ||||||
|             $walletAgent->balance_princ += $demand->montant; |             $walletAgent->balance_princ += $demand->montant; | ||||||
|             $walletParrain->balance_princ -= $demand->montant; |             $walletParrain->balance_princ -= $demand->montant; | ||||||
| 
 | 
 | ||||||
|             DB::update('UPDATE demandeCredits SET `status` = \'1\' , date_modification = CURRENT_TIMESTAMP WHERE ( id = ? );',[$demand->id]); |             DB::update('UPDATE demandeCredits SET `status` = \'1\' , date_modification = ? , date_creation = ?  WHERE ( id = ? );', [$datetime, $datetime, $demand->id]); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $walletAgent->save(); |         $walletAgent->save(); | ||||||
|  |  | ||||||
|  | @ -146,4 +146,10 @@ class HelperController extends Controller | ||||||
|         } |         } | ||||||
|         return $this->successResponse($codes); |         return $this->successResponse($codes); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     // Afficher l'heure en fonction du pays de l'utilisateur
 | ||||||
|  |     public function getCurrentTimeB() | ||||||
|  |     { | ||||||
|  |         dd($this->getCurrentTime()); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -123,7 +123,7 @@ class NanoCreditController extends Controller | ||||||
|                 $demande->id_user = $user->id; |                 $demande->id_user = $user->id; | ||||||
|                 $demande->id_demande = $demande_credit->id_demande; |                 $demande->id_demande = $demande_credit->id_demande; | ||||||
|                 $demande->id_agent = $walletHyper->agent_id; |                 $demande->id_agent = $walletHyper->agent_id; | ||||||
|                 $demande->date_creation = new \DateTime(); |                 $demande->date_creation = $this->getCurrentTime($init_country); | ||||||
|                 $demande->type = 'nano_credit'; |                 $demande->type = 'nano_credit'; | ||||||
|                 $demande->save(); |                 $demande->save(); | ||||||
| 
 | 
 | ||||||
|  | @ -141,7 +141,7 @@ class NanoCreditController extends Controller | ||||||
|                 $walletHyper = Wallet::findOrFail($walletHyper->wallet_id); |                 $walletHyper = Wallet::findOrFail($walletHyper->wallet_id); | ||||||
|                 $walletUser = WalletsUser::where('idUser', $request->id_user)->firstOrFail(); |                 $walletUser = WalletsUser::where('idUser', $request->id_user)->firstOrFail(); | ||||||
| 
 | 
 | ||||||
|                 $demande_credit->date_validation = new \DateTime(); |                 $demande_credit->date_validation = $this->getCurrentTime($init_country); | ||||||
|                 $demande_credit->date_remboursement_prevu = $demande_credit->date_validation->modify('+' . $request->duree_mois . ' month'); |                 $demande_credit->date_remboursement_prevu = $demande_credit->date_validation->modify('+' . $request->duree_mois . ' month'); | ||||||
|                 $demande_credit->etat = 'VALIDE'; |                 $demande_credit->etat = 'VALIDE'; | ||||||
| 
 | 
 | ||||||
|  | @ -173,6 +173,7 @@ class NanoCreditController extends Controller | ||||||
|             $montant_total = $demande_credit->montant + $demande_credit->interet + $demande_credit->taxe; |             $montant_total = $demande_credit->montant + $demande_credit->interet + $demande_credit->taxe; | ||||||
| 
 | 
 | ||||||
|             $demande_credit->id_demande = $this->getNanoCreditDemandID(); |             $demande_credit->id_demande = $this->getNanoCreditDemandID(); | ||||||
|  |             $demande_credit->date_creation = $this->getCurrentTime($init_country); | ||||||
|             $demande_credit->save(); |             $demande_credit->save(); | ||||||
| 
 | 
 | ||||||
|             $message = trans('messages.successful_user_individual_nano_credit_demand', |             $message = trans('messages.successful_user_individual_nano_credit_demand', | ||||||
|  | @ -345,7 +346,7 @@ class NanoCreditController extends Controller | ||||||
|             return $this->errorResponse(trans('errors.insufficient_balance')); |             return $this->errorResponse(trans('errors.insufficient_balance')); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         $demande_credit->date_validation = new \DateTime(); |         $demande_credit->date_validation = $this->getCurrentTime($agent_country); | ||||||
|         $demande_credit->date_remboursement_prevu = $demande_credit->date_validation->modify('+' . $demande_credit->duree_mois . ' month'); |         $demande_credit->date_remboursement_prevu = $demande_credit->date_validation->modify('+' . $demande_credit->duree_mois . ' month'); | ||||||
|         $demande_credit->etat = 'VALIDE'; |         $demande_credit->etat = 'VALIDE'; | ||||||
|         $demande_credit->id_wallet_agent = $walletAgent->id; |         $demande_credit->id_wallet_agent = $walletAgent->id; | ||||||
|  | @ -489,7 +490,7 @@ class NanoCreditController extends Controller | ||||||
|         $saving->fill($request->all()); |         $saving->fill($request->all()); | ||||||
|         $saving->id_network = $config->id_network; |         $saving->id_network = $config->id_network; | ||||||
|         $sumFees = 0; |         $sumFees = 0; | ||||||
|         $saving->date_creation = new \DateTime(); |         $saving->date_creation = $this->getCurrentTime($init_country); | ||||||
|         if ($request->type == 'blocked') { |         if ($request->type == 'blocked') { | ||||||
|             $taxes = array_values(array_filter($config->taxes->all(), function ($tax) { |             $taxes = array_values(array_filter($config->taxes->all(), function ($tax) { | ||||||
|                 return $tax->categorie == 'epargne'; |                 return $tax->categorie == 'epargne'; | ||||||
|  | @ -573,7 +574,7 @@ class NanoCreditController extends Controller | ||||||
|         $user->balance_epargne -= $montant_total; |         $user->balance_epargne -= $montant_total; | ||||||
|         $walletUser->balance += $montant_total; |         $walletUser->balance += $montant_total; | ||||||
|         $saving->etat = 'CASSE'; |         $saving->etat = 'CASSE'; | ||||||
|         $saving->date_cassation = new \DateTime(); |         $saving->date_cassation = $this->getCurrentTime($init_country); | ||||||
| 
 | 
 | ||||||
|         $user->save(); |         $user->save(); | ||||||
|         $walletUser->save(); |         $walletUser->save(); | ||||||
|  |  | ||||||
|  | @ -10,13 +10,14 @@ use App\Models\Wallet; | ||||||
| use App\Models\WalletAgent; | use App\Models\WalletAgent; | ||||||
| use App\Models\WalletTransaction; | use App\Models\WalletTransaction; | ||||||
| use App\Traits\ApiResponser; | use App\Traits\ApiResponser; | ||||||
|  | use App\Traits\Helper; | ||||||
| use Illuminate\Http\Request; | use Illuminate\Http\Request; | ||||||
| use Illuminate\Http\Response; | use Illuminate\Http\Response; | ||||||
| use Illuminate\Support\Facades\DB; |  | ||||||
| 
 | 
 | ||||||
| class TransactionController extends Controller | class TransactionController extends Controller | ||||||
| { | { | ||||||
|     use ApiResponser; |     use ApiResponser; | ||||||
|  |     use Helper; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * Create a new controller instance. |      * Create a new controller instance. | ||||||
|  | @ -173,7 +174,7 @@ class TransactionController extends Controller | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $transaction->date = new \DateTime(); |         $transaction->date = $this->getCurrentTime($walletAgent->networks_agent->network->country_id); | ||||||
|         $transaction->statut = 1; |         $transaction->statut = 1; | ||||||
|         $walletAgent->save(); |         $walletAgent->save(); | ||||||
|         $walletSuperviseur->save(); |         $walletSuperviseur->save(); | ||||||
|  |  | ||||||
|  | @ -126,6 +126,7 @@ class TransmittingNetworksController extends Controller | ||||||
| 
 | 
 | ||||||
|                 $transaction->commission_hyp = $transaction->commission_hyp_final_country = $request->montant_commission; |                 $transaction->commission_hyp = $transaction->commission_hyp_final_country = $request->montant_commission; | ||||||
|                 $transaction->status_reseau_payeur = 'TRAITEE'; |                 $transaction->status_reseau_payeur = 'TRAITEE'; | ||||||
|  |                 $transaction->date = $this->getCurrentTimeByCountryCode($initNetwork->country->code_country); | ||||||
|                 $transaction->save(); |                 $transaction->save(); | ||||||
| 
 | 
 | ||||||
|                 $message = trans('messages.wallet_incoming_payment_message', |                 $message = trans('messages.wallet_incoming_payment_message', | ||||||
|  | @ -159,7 +160,7 @@ class TransmittingNetworksController extends Controller | ||||||
|                 $transaction->commission_ag = floatval($request->montant_commission * $configRecipient->taux_com_ag_envoi_cash / 100); |                 $transaction->commission_ag = floatval($request->montant_commission * $configRecipient->taux_com_ag_envoi_cash / 100); | ||||||
|                 $transaction->commission_sup = floatval($request->montant_commission * $configRecipient->taux_com_sup_envoi_cash / 100); |                 $transaction->commission_sup = floatval($request->montant_commission * $configRecipient->taux_com_sup_envoi_cash / 100); | ||||||
|                 $transaction->commission_hyp = $transaction->commission_hyp_final_country = floatval($request->montant_commission * $configRecipient->taux_com_hyp_envoi_cash / 100); |                 $transaction->commission_hyp = $transaction->commission_hyp_final_country = floatval($request->montant_commission * $configRecipient->taux_com_hyp_envoi_cash / 100); | ||||||
| 
 |                 $transaction->date = $this->getCurrentTimeByCountryCode($initNetwork->country->code_country); | ||||||
|                 $transaction->save(); |                 $transaction->save(); | ||||||
| 
 | 
 | ||||||
|                 $message = trans('messages.cash_incoming_payment_message', |                 $message = trans('messages.cash_incoming_payment_message', | ||||||
|  |  | ||||||
|  | @ -46,6 +46,7 @@ class UserController extends Controller | ||||||
|         $identification->fill($request->all()); |         $identification->fill($request->all()); | ||||||
|         $identification->id_user = $user->id; |         $identification->id_user = $user->id; | ||||||
|         $identification->status = 0; |         $identification->status = 0; | ||||||
|  |         $identification->createdAt = $this->getCurrentTimeByCountryCode($user->network->country->code_country); | ||||||
| 
 | 
 | ||||||
|         $identification->save(); |         $identification->save(); | ||||||
|         $this->sendMail($user->email, trans('messages.successful_identification', ['name' => $identification->lastname . ' ' . $identification->firstname]), |         $this->sendMail($user->email, trans('messages.successful_identification', ['name' => $identification->lastname . ' ' . $identification->firstname]), | ||||||
|  |  | ||||||
|  | @ -110,19 +110,19 @@ class UserGroupController extends Controller | ||||||
|             return $resp3; |             return $resp3; | ||||||
| 
 | 
 | ||||||
|         $group->id_createur = $request->id_user; |         $group->id_createur = $request->id_user; | ||||||
|         $group->date_creation = new \DateTime(); |         $group->date_creation = $this->getCurrentTime($init_country); | ||||||
|         $group->nombre_validation = 0; |         $group->nombre_validation = 0; | ||||||
|         $group->actif = false; |         $group->actif = false; | ||||||
|         $group->nombre_utilisateurs = 1; |         $group->nombre_utilisateurs = 1; | ||||||
|         $group->code_groupe = $this->getGroupID(); |         $group->code_groupe = $this->getGroupID(); | ||||||
|         $group->save(); |         $group->save(); | ||||||
|         $user->group_id = $group->id; |         $user->group_id = $group->id; | ||||||
|         $user->date_adhesion = new \DateTime(); |         $user->date_adhesion = $group->date_creation; | ||||||
|         $user->save(); |         $user->save(); | ||||||
| 
 | 
 | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $request->code_sponsor1, $user); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $request->code_sponsor1, $user, $init_country); | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $request->code_sponsor2, $user); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $request->code_sponsor2, $user, $init_country); | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $request->code_sponsor3, $user); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $request->code_sponsor3, $user, $init_country); | ||||||
| 
 | 
 | ||||||
|         return $this->successResponse(trans('messages.successful_user_group_created')); |         return $this->successResponse(trans('messages.successful_user_group_created')); | ||||||
| 
 | 
 | ||||||
|  | @ -172,11 +172,11 @@ class UserGroupController extends Controller | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $sponsor->group_id = $group->id; |         $sponsor->group_id = $group->id; | ||||||
|         $sponsor->date_adhesion = new \DateTime(); |         $sponsor->date_adhesion = $this->getCurrentTimeByCountryCode($sponsor->network->country->code_country); | ||||||
|         $sponsor->save(); |         $sponsor->save(); | ||||||
|         $group->save(); |         $group->save(); | ||||||
|         $demande->statut = true; |         $demande->statut = true; | ||||||
|         $demande->date_validation = new \DateTime(); |         $demande->date_validation = $sponsor->date_adhesion; | ||||||
|         $demande->save(); |         $demande->save(); | ||||||
|         // Notififier le createur
 |         // Notififier le createur
 | ||||||
|         $data = new \stdClass(); |         $data = new \stdClass(); | ||||||
|  | @ -209,7 +209,7 @@ class UserGroupController extends Controller | ||||||
|         $group = UsersGroup::findOrFail($demande->id_group); |         $group = UsersGroup::findOrFail($demande->id_group); | ||||||
| 
 | 
 | ||||||
|         $demande->statut = 2; |         $demande->statut = 2; | ||||||
|         $demande->date_validation = new \DateTime(); |         $demande->date_validation = $this->getCurrentTimeByCountryCode($sponsor->network->country->code_country); | ||||||
|         $demande->save(); |         $demande->save(); | ||||||
|         // Notififier le createur
 |         // Notififier le createur
 | ||||||
|         $data = new \stdClass(); |         $data = new \stdClass(); | ||||||
|  | @ -335,15 +335,15 @@ class UserGroupController extends Controller | ||||||
|         $group->date_activation = null; |         $group->date_activation = null; | ||||||
|         if (isset($prevSponsor1)) { |         if (isset($prevSponsor1)) { | ||||||
|             $prevSponsor1->save(); |             $prevSponsor1->save(); | ||||||
|             $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $request->code_sponsor1, $user); |             $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $request->code_sponsor1, $user, $init_country); | ||||||
|         } |         } | ||||||
|         if (isset($prevSponsor2)) { |         if (isset($prevSponsor2)) { | ||||||
|             $prevSponsor2->save(); |             $prevSponsor2->save(); | ||||||
|             $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $request->code_sponsor2, $user); |             $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $request->code_sponsor2, $user, $init_country); | ||||||
|         } |         } | ||||||
|         if (isset($prevSponsor3)) { |         if (isset($prevSponsor3)) { | ||||||
|             $prevSponsor3->save(); |             $prevSponsor3->save(); | ||||||
|             $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $request->code_sponsor3, $user); |             $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $request->code_sponsor3, $user, $init_country); | ||||||
|         } |         } | ||||||
|         $group->save(); |         $group->save(); | ||||||
| 
 | 
 | ||||||
|  | @ -351,12 +351,12 @@ class UserGroupController extends Controller | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     private function sendNotificationToSponsor($id_group, $id_sponsor, $sponsor_code, User $sender, $type = 'creation') |     private function sendNotificationToSponsor($id_group, $id_sponsor, $sponsor_code, User $sender, $init_country, $type = 'creation') | ||||||
|     { |     { | ||||||
|         $demande = new UsersGroupsDemandesValidation(); |         $demande = new UsersGroupsDemandesValidation(); | ||||||
|         $demande->id_group = $id_group; |         $demande->id_group = $id_group; | ||||||
|         $demande->id_sponsor = $id_sponsor; |         $demande->id_sponsor = $id_sponsor; | ||||||
|         $demande->date_creation = new \DateTime(); |         $demande->date_creation = $this->getCurrentTime($init_country); | ||||||
|         $demande->statut = false; |         $demande->statut = false; | ||||||
|         $demande->type = $type; |         $demande->type = $type; | ||||||
| 
 | 
 | ||||||
|  | @ -443,7 +443,7 @@ ug.date_creation as date_creation_groupe , ug.createur , ug.sponsor1 , ug.sponso | ||||||
|             return $identfication; |             return $identfication; | ||||||
| 
 | 
 | ||||||
|         // Notifier le sponsor
 |         // Notifier le sponsor
 | ||||||
|         $this->sendNotificationToSponsor($group->id, $sponsor->id, $sponsor->user_code, $user, 'adhesion'); |         $this->sendNotificationToSponsor($group->id, $sponsor->id, $sponsor->user_code, $user, $country_user, 'adhesion'); | ||||||
|         return $this->successResponse(trans('messages.successful_group_membership_request')); |         return $this->successResponse(trans('messages.successful_group_membership_request')); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  | @ -460,13 +460,13 @@ ug.date_creation as date_creation_groupe , ug.createur , ug.sponsor1 , ug.sponso | ||||||
|         if ($user->group_id) |         if ($user->group_id) | ||||||
|             return $this->errorResponse(trans('errors.user_already_member_of_group')); |             return $this->errorResponse(trans('errors.user_already_member_of_group')); | ||||||
|         $user->group_id = $group->id; |         $user->group_id = $group->id; | ||||||
|         $user->date_adhesion = new \DateTime(); |         $user->date_adhesion = $this->getCurrentTimeByCountryCode($sponsor->network->country->code_country); | ||||||
|         $user->save(); |         $user->save(); | ||||||
|         ++$group->nombre_utilisateurs; |         ++$group->nombre_utilisateurs; | ||||||
|         $group->save(); |         $group->save(); | ||||||
| 
 | 
 | ||||||
|         $demande->statut = true; |         $demande->statut = true; | ||||||
|         $demande->date_validation = new \DateTime(); |         $demande->date_validation = $user->date_adhesion; | ||||||
|         $demande->save(); |         $demande->save(); | ||||||
|         // Notififier l'utilisateur
 |         // Notififier l'utilisateur
 | ||||||
|         $data = new \stdClass(); |         $data = new \stdClass(); | ||||||
|  | @ -487,13 +487,15 @@ ug.date_creation as date_creation_groupe , ug.createur , ug.sponsor1 , ug.sponso | ||||||
|             'id_user' => 'required|integer|min:0|not_in:0' |             'id_user' => 'required|integer|min:0|not_in:0' | ||||||
|         ]); |         ]); | ||||||
| 
 | 
 | ||||||
|  |         $user = User::findOrFail($request->id_user); | ||||||
|  |         $country_user = $user->network->country->id; | ||||||
|         $group = UsersGroup::where('code_groupe', $request->code_groupe)->firstOrFail(); |         $group = UsersGroup::where('code_groupe', $request->code_groupe)->firstOrFail(); | ||||||
|         if ($group->id_createur != $request->id_user) |         if ($group->id_createur != $request->id_user) | ||||||
|             return $this->errorResponse(trans('errors.not_group_creator')); |             return $this->errorResponse(trans('errors.not_group_creator')); | ||||||
| 
 | 
 | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $group->sponsor1->user_code, $group->createur, 'suppression'); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor1, $group->sponsor1->user_code, $group->createur, $country_user, 'suppression'); | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $group->sponsor2->user_code, $group->createur, 'suppression'); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor2, $group->sponsor2->user_code, $group->createur, $country_user, 'suppression'); | ||||||
|         $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $group->sponsor3->user_code, $group->createur, 'suppression'); |         $this->sendNotificationToSponsor($group->id, $group->id_sponsor3, $group->sponsor3->user_code, $group->createur, $country_user, 'suppression'); | ||||||
| 
 | 
 | ||||||
|         return $this->successResponse(trans('messages.successful_user_group_deleted')); |         return $this->successResponse(trans('messages.successful_user_group_deleted')); | ||||||
| 
 | 
 | ||||||
|  | @ -523,7 +525,7 @@ ug.date_creation as date_creation_groupe , ug.createur , ug.sponsor1 , ug.sponso | ||||||
|         } |         } | ||||||
|         $group->save(); |         $group->save(); | ||||||
|         $demande->statut = true; |         $demande->statut = true; | ||||||
|         $demande->date_validation = new \DateTime(); |         $demande->date_validation = $this->getCurrentTimeByCountryCode($sponsor->network->country->code_country); | ||||||
|         $demande->save(); |         $demande->save(); | ||||||
|         // Notififier le createur
 |         // Notififier le createur
 | ||||||
|         $data = new \stdClass(); |         $data = new \stdClass(); | ||||||
|  | @ -602,7 +604,7 @@ ug.date_creation , ug.createur , ug.sponsor1 , ug.sponsor2 , ug.sponsor3, ug.cou | ||||||
|         $walletHyper->balance_princ -= $demande_credit->montant; |         $walletHyper->balance_princ -= $demande_credit->montant; | ||||||
| 
 | 
 | ||||||
|         $demande->statut = true; |         $demande->statut = true; | ||||||
|         $demande->date_validation = new \DateTime(); |         $demande->date_validation = $this->getCurrentTimeByCountryCode($user->network->country->code_country); | ||||||
|         $user->save(); |         $user->save(); | ||||||
|         $walletUser->save(); |         $walletUser->save(); | ||||||
|         $walletHyper->save(); |         $walletHyper->save(); | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ class WalletController extends Controller | ||||||
| 
 | 
 | ||||||
|     public function activated($id_agent) |     public function activated($id_agent) | ||||||
|     { |     { | ||||||
|         $networks = DB::select('SELECT ne.name as network , cc.name AS country, cc.currency_code, w.id, w.balance_princ , w.balance_com, w.created_date, cw.type, |         $networks = DB::select('SELECT ne.name as network , cc.name AS country, cc.code_country, cc.currency_code, 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 |                 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_currencies cc ON ne.country_id=cc.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN ( |                 INNER JOIN countries_currencies cc ON ne.country_id=cc.id LEFT JOIN wallets w ON na.id = w.id_networkAgent WHERE ag.id= :id AND network_id IN ( | ||||||
|  | @ -45,7 +45,8 @@ class WalletController extends Controller | ||||||
|                 $category = $network->category; |                 $category = $network->category; | ||||||
|                 // Create wallet if is not exist
 |                 // Create wallet if is not exist
 | ||||||
|                 if (!$network->id) { |                 if (!$network->id) { | ||||||
|                     DB::insert('INSERT INTO  wallets (id_networkAgent) VALUES (?);', [$network->id_networkAgent]); |                     $datetime = $this->getCurrentTimeByCountryCode($network->code_country); | ||||||
|  |                     DB::insert('INSERT INTO  wallets (id_networkAgent , created_date) VALUES (? , ?);', [$network->id_networkAgent, $datetime]); | ||||||
|                     $reload = true; |                     $reload = true; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -271,6 +271,7 @@ class iLinkTransactionController extends Controller | ||||||
|                         $walletUser->save(); |                         $walletUser->save(); | ||||||
|                         if (isset($reseauPayeur)) |                         if (isset($reseauPayeur)) | ||||||
|                             $reseauPayeur->save(); |                             $reseauPayeur->save(); | ||||||
|  |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $transaction->save(); |                         $transaction->save(); | ||||||
|                         $message = trans('messages.successful_user_send_to_wallet', |                         $message = trans('messages.successful_user_send_to_wallet', | ||||||
|                             ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), 'net_init' => $this->toMoney($montantDepot, $init_country), |                             ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), 'net_init' => $this->toMoney($montantDepot, $init_country), | ||||||
|  | @ -330,6 +331,7 @@ class iLinkTransactionController extends Controller | ||||||
|                             $walletHyperviseur->save(); |                             $walletHyperviseur->save(); | ||||||
|                             $walletUser->save(); |                             $walletUser->save(); | ||||||
|                             $transaction->id_transaction = $this->getTransactionID(); |                             $transaction->id_transaction = $this->getTransactionID(); | ||||||
|  |                             $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                             $transaction->save(); |                             $transaction->save(); | ||||||
|                             $message = trans('messages.successful_user_send_to_cart', |                             $message = trans('messages.successful_user_send_to_cart', | ||||||
|                                 ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), |                                 ['id_transaction' => $transaction->id_transaction, 'amount' => $this->toMoney($transaction->montant, $init_country), | ||||||
|  | @ -422,7 +424,7 @@ class iLinkTransactionController extends Controller | ||||||
|                             $reseauPayeur->save(); |                             $reseauPayeur->save(); | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|                         $walletUser->save(); |                         $walletUser->save(); | ||||||
|                         $transaction->date = new \DateTime(); |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $transaction->status_retrait = 0; |                         $transaction->status_retrait = 0; | ||||||
|                         $transaction->save(); |                         $transaction->save(); | ||||||
|                         $message = trans('messages.successful_user_send_to_cash', |                         $message = trans('messages.successful_user_send_to_cash', | ||||||
|  | @ -491,6 +493,7 @@ class iLinkTransactionController extends Controller | ||||||
|                 $transaction->country = $network_bank->network->country->name; |                 $transaction->country = $network_bank->network->country->name; | ||||||
|                 $transaction->id_bank = $request->id_bank; |                 $transaction->id_bank = $request->id_bank; | ||||||
|                 $transaction->iban = $request->iban; |                 $transaction->iban = $request->iban; | ||||||
|  |                 $transaction->date = $this->getCurrentTime($init_country); | ||||||
| //                $walletUser->save();
 | //                $walletUser->save();
 | ||||||
|                 $transaction->id_transaction = $this->getTransactionID(); |                 $transaction->id_transaction = $this->getTransactionID(); | ||||||
| //                $transaction->save();
 | //                $transaction->save();
 | ||||||
|  | @ -543,7 +546,7 @@ class iLinkTransactionController extends Controller | ||||||
| 
 | 
 | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|                         $walletUser->save(); |                         $walletUser->save(); | ||||||
|                         $transaction->date = new \DateTime(); |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $transaction->status_retrait = 0; |                         $transaction->status_retrait = 0; | ||||||
|                         $transaction->save(); |                         $transaction->save(); | ||||||
|                         $message = trans('messages.successful_user_remove_from_wallet_to_cash', |                         $message = trans('messages.successful_user_remove_from_wallet_to_cash', | ||||||
|  | @ -603,6 +606,7 @@ class iLinkTransactionController extends Controller | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|                         $walletUser->save(); |                         $walletUser->save(); | ||||||
|                         $transaction->id_transaction = $this->getTransactionID(); |                         $transaction->id_transaction = $this->getTransactionID(); | ||||||
|  |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $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), | ||||||
|  | @ -667,7 +671,7 @@ class iLinkTransactionController extends Controller | ||||||
|                         $walletHyperviseur->balance_com += $transaction->commission_hyp; |                         $walletHyperviseur->balance_com += $transaction->commission_hyp; | ||||||
|                         $transaction->id_wallet_hyp = $walletHyperviseur->id; |                         $transaction->id_wallet_hyp = $walletHyperviseur->id; | ||||||
|                         $transaction->frais = $frais; |                         $transaction->frais = $frais; | ||||||
|                         $transaction->date = new \DateTime(); |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $transaction->status_retrait = 0; |                         $transaction->status_retrait = 0; | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|                         $transaction->id_transaction = $this->getTransactionID(); |                         $transaction->id_transaction = $this->getTransactionID(); | ||||||
|  | @ -741,8 +745,8 @@ class iLinkTransactionController extends Controller | ||||||
|                                     $transactionRetrait->status_retrait = $transactionRetrait->commission_banque = $transactionRetrait->code_retrait_salt = $transactionRetrait->encrypted_code_retrait = null; |                                     $transactionRetrait->status_retrait = $transactionRetrait->commission_banque = $transactionRetrait->code_retrait_salt = $transactionRetrait->encrypted_code_retrait = null; | ||||||
|                                     $transactionRetrait->frais = $transactionRetrait->taxe = 0; |                                     $transactionRetrait->frais = $transactionRetrait->taxe = 0; | ||||||
|                                     $transaction->status_retrait = 1; |                                     $transaction->status_retrait = 1; | ||||||
|                                     $transaction->date_retrait = new \DateTime(); |                                     $transaction->date_retrait = $this->getCurrentTime($init_country); | ||||||
|                                     $transactionRetrait->date = new \DateTime(); |                                     $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                                     //Si la transaction provient du reseau emetteur
 |                                     //Si la transaction provient du reseau emetteur
 | ||||||
|                                     if ($transaction->from_network_emetteur) { |                                     if ($transaction->from_network_emetteur) { | ||||||
|                                         $transaction->status_reseau_payeur = 'TRAITEE'; |                                         $transaction->status_reseau_payeur = 'TRAITEE'; | ||||||
|  | @ -828,7 +832,7 @@ class iLinkTransactionController extends Controller | ||||||
|                         $transaction->id_wallet_sup = $walletSuperviseur->id; |                         $transaction->id_wallet_sup = $walletSuperviseur->id; | ||||||
|                         $transaction->id_wallet_hyp = $walletHyperviseur->id; |                         $transaction->id_wallet_hyp = $walletHyperviseur->id; | ||||||
|                         $transaction->frais = $frais; |                         $transaction->frais = $frais; | ||||||
|                         $transaction->date = new \DateTime(); |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $walletAgent->save(); |                         $walletAgent->save(); | ||||||
|                         $walletSuperviseur->save(); |                         $walletSuperviseur->save(); | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|  | @ -878,7 +882,7 @@ class iLinkTransactionController extends Controller | ||||||
|                     $transaction->commission_hyp = $commisionHyper; |                     $transaction->commission_hyp = $commisionHyper; | ||||||
|                     $transaction->taxe = $taxe; |                     $transaction->taxe = $taxe; | ||||||
|                     $transaction->frais = $frais; |                     $transaction->frais = $frais; | ||||||
|                     $transaction->date = new \DateTime(); |                     $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                     $walletUser->save(); |                     $walletUser->save(); | ||||||
|                     $walletAgent->save(); |                     $walletAgent->save(); | ||||||
|                     $walletSuperviseur->save(); |                     $walletSuperviseur->save(); | ||||||
|  | @ -942,7 +946,7 @@ class iLinkTransactionController extends Controller | ||||||
|                     $transaction->commission_hyp = $commisionHyper; |                     $transaction->commission_hyp = $commisionHyper; | ||||||
|                     $transaction->taxe = $taxe; |                     $transaction->taxe = $taxe; | ||||||
|                     $transaction->frais = $frais; |                     $transaction->frais = $frais; | ||||||
|                     $transaction->date = new \DateTime(); |                     $transaction->date = $this->getCurrentTime($init_country); | ||||||
| 
 | 
 | ||||||
|                     $walletAgent->save(); |                     $walletAgent->save(); | ||||||
|                     $walletSuperviseur->save(); |                     $walletSuperviseur->save(); | ||||||
|  | @ -1022,7 +1026,7 @@ class iLinkTransactionController extends Controller | ||||||
|                         $transaction->id_wallet_sup = $walletSuperviseur->id; |                         $transaction->id_wallet_sup = $walletSuperviseur->id; | ||||||
|                         $transaction->id_wallet_hyp = $walletHyperviseur->id; |                         $transaction->id_wallet_hyp = $walletHyperviseur->id; | ||||||
|                         $transaction->frais = $frais; |                         $transaction->frais = $frais; | ||||||
|                         $transaction->date = new \DateTime(); |                         $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                         $walletAgent->save(); |                         $walletAgent->save(); | ||||||
|                         $walletSuperviseur->save(); |                         $walletSuperviseur->save(); | ||||||
|                         $walletHyperviseur->save(); |                         $walletHyperviseur->save(); | ||||||
|  | @ -1118,7 +1122,7 @@ class iLinkTransactionController extends Controller | ||||||
|                     $walletAgent->balance_princ -= $transaction->montant; |                     $walletAgent->balance_princ -= $transaction->montant; | ||||||
|                     $transaction->frais = $frais; |                     $transaction->frais = $frais; | ||||||
|                     $transaction->taxe = $taxe; |                     $transaction->taxe = $taxe; | ||||||
|                     $transaction->date = new \DateTime(); |                     $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                     $transaction->status_retrait = 0; |                     $transaction->status_retrait = 0; | ||||||
|                     if (isset($reseauPayeur)) |                     if (isset($reseauPayeur)) | ||||||
|                         $reseauPayeur->save(); |                         $reseauPayeur->save(); | ||||||
|  | @ -1184,7 +1188,7 @@ class iLinkTransactionController extends Controller | ||||||
|                 $transaction->id_wallet_ag = $walletAgent->id; |                 $transaction->id_wallet_ag = $walletAgent->id; | ||||||
|                 $transaction->id_wallet_sup = $walletSuperviseur->id; |                 $transaction->id_wallet_sup = $walletSuperviseur->id; | ||||||
|                 $transaction->frais = $frais; |                 $transaction->frais = $frais; | ||||||
|                 $transaction->date = new \DateTime(); |                 $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                 $transaction->bank = $network_bank->operators_country->operator->nom; |                 $transaction->bank = $network_bank->operators_country->operator->nom; | ||||||
|                 $transaction->country = $network_bank->network->country->name; |                 $transaction->country = $network_bank->network->country->name; | ||||||
|                 $transaction->id_bank = $request->id_bank; |                 $transaction->id_bank = $request->id_bank; | ||||||
|  | @ -1286,7 +1290,7 @@ class iLinkTransactionController extends Controller | ||||||
| 
 | 
 | ||||||
|                 $transaction->id_wallet_hyp = $walletHyperviseur->id; |                 $transaction->id_wallet_hyp = $walletHyperviseur->id; | ||||||
|                 $transaction->frais = $frais; |                 $transaction->frais = $frais; | ||||||
|                 $transaction->date = new \DateTime(); |                 $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                 $transaction->operator = $network_bank->operators_country->operator->nom; |                 $transaction->operator = $network_bank->operators_country->operator->nom; | ||||||
|                 $type_operator = $network_bank->operators_country->operator->type_operator; |                 $type_operator = $network_bank->operators_country->operator->type_operator; | ||||||
|                 $transaction->type_operator = app()->isLocale('en') ? $type_operator->description_en : $type_operator->description_fr; |                 $transaction->type_operator = app()->isLocale('en') ? $type_operator->description_en : $type_operator->description_fr; | ||||||
|  | @ -1363,7 +1367,7 @@ class iLinkTransactionController extends Controller | ||||||
| 
 | 
 | ||||||
|                 $transaction->id_wallet_hyp = $walletHyperviseur->id; |                 $transaction->id_wallet_hyp = $walletHyperviseur->id; | ||||||
|                 $transaction->frais = $frais; |                 $transaction->frais = $frais; | ||||||
|                 $transaction->date = new \DateTime(); |                 $transaction->date = $this->getCurrentTime($init_country); | ||||||
|                 $transaction->bank = $user->bank->operators_country->operator->nom; |                 $transaction->bank = $user->bank->operators_country->operator->nom; | ||||||
|                 $transaction->country = $user->bank->network->country->name; |                 $transaction->country = $user->bank->network->country->name; | ||||||
|                 $transaction->id_bank = $user->id_bank_country; |                 $transaction->id_bank = $user->id_bank_country; | ||||||
|  |  | ||||||
|  | @ -373,7 +373,7 @@ trait Helper | ||||||
|                 $walletHyper->save(); |                 $walletHyper->save(); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             $demande_credit->date_remboursement = new \DateTime(); |             $demande_credit->date_remboursement = $this->getCurrentTime($init_country); | ||||||
|             $demande_credit->montant = $resteARembourser; |             $demande_credit->montant = $resteARembourser; | ||||||
| 
 | 
 | ||||||
|             $walletUser->save(); |             $walletUser->save(); | ||||||
|  | @ -396,6 +396,7 @@ trait Helper | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     //Envoyer la trame au reseau payeur externe
 | ||||||
|     public function sendFrame($paying_network_url, WalletIlinkTransaction $transaction, $code_retrait = null) |     public function sendFrame($paying_network_url, WalletIlinkTransaction $transaction, $code_retrait = null) | ||||||
|     { |     { | ||||||
|         $client = new \GuzzleHttp\Client(); |         $client = new \GuzzleHttp\Client(); | ||||||
|  | @ -478,4 +479,22 @@ trait Helper | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     // Obtenir l'heure en fonction du pays de l'utilisateur
 | ||||||
|  |     public function getCurrentTime($id_country) | ||||||
|  |     { | ||||||
|  |         $country = Country::find($id_country); | ||||||
|  |         $country_code = isset($country) ? $country->code_country : 'GA'; | ||||||
|  |         $timezone = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $country_code); | ||||||
|  |         $date = (sizeof($timezone) > 0) ? new \DateTime('now', new \DateTimeZone($timezone[0])) : new \DateTime(); | ||||||
|  |         return $date->format('Y-m-d H:i:s'); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | // Obtenir l'heure en fonction du code du pays de l'utilisateur
 | ||||||
|  |     public function getCurrentTimeByCountryCode($country_code = 'GA') | ||||||
|  |     { | ||||||
|  |         $timezone = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $country_code); | ||||||
|  |         $date = (sizeof($timezone) > 0) ? new \DateTime('now', new \DateTimeZone($timezone[0])) : new \DateTime(); | ||||||
|  |         return $date->format('Y-m-d H:i:s'); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2201,29 +2201,31 @@ | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nesbot/carbon", |             "name": "nesbot/carbon", | ||||||
|             "version": "2.32.1", |             "version": "2.41.5", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/briannesbitt/Carbon.git", |                 "url": "https://github.com/briannesbitt/Carbon.git", | ||||||
|                 "reference": "ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c" |                 "reference": "c4a9caf97cfc53adfc219043bcecf42bc663acee" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c", |                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c4a9caf97cfc53adfc219043bcecf42bc663acee", | ||||||
|                 "reference": "ecb525c766deb3bbbb6a0082ea0e41d3d9ae477c", |                 "reference": "c4a9caf97cfc53adfc219043bcecf42bc663acee", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
|                 "ext-json": "*", |                 "ext-json": "*", | ||||||
|                 "php": "^7.1.8 || ^8.0", |                 "php": "^7.1.8 || ^8.0", | ||||||
|  |                 "symfony/polyfill-mbstring": "^1.0", | ||||||
|                 "symfony/translation": "^3.4 || ^4.0 || ^5.0" |                 "symfony/translation": "^3.4 || ^4.0 || ^5.0" | ||||||
|             }, |             }, | ||||||
|             "require-dev": { |             "require-dev": { | ||||||
|                 "doctrine/orm": "^2.7", |                 "doctrine/orm": "^2.7", | ||||||
|                 "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", |                 "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", | ||||||
|                 "kylekatarnls/multi-tester": "^1.1", |                 "kylekatarnls/multi-tester": "^2.0", | ||||||
|                 "phpmd/phpmd": "^2.8", |                 "phpmd/phpmd": "^2.9", | ||||||
|                 "phpstan/phpstan": "^0.11", |                 "phpstan/extension-installer": "^1.0", | ||||||
|  |                 "phpstan/phpstan": "^0.12.35", | ||||||
|                 "phpunit/phpunit": "^7.5 || ^8.0", |                 "phpunit/phpunit": "^7.5 || ^8.0", | ||||||
|                 "squizlabs/php_codesniffer": "^3.4" |                 "squizlabs/php_codesniffer": "^3.4" | ||||||
|             }, |             }, | ||||||
|  | @ -2233,12 +2235,18 @@ | ||||||
|             "type": "library", |             "type": "library", | ||||||
|             "extra": { |             "extra": { | ||||||
|                 "branch-alias": { |                 "branch-alias": { | ||||||
|                     "dev-master": "2.x-dev" |                     "dev-master": "2.x-dev", | ||||||
|  |                     "dev-3.x": "3.x-dev" | ||||||
|                 }, |                 }, | ||||||
|                 "laravel": { |                 "laravel": { | ||||||
|                     "providers": [ |                     "providers": [ | ||||||
|                         "Carbon\\Laravel\\ServiceProvider" |                         "Carbon\\Laravel\\ServiceProvider" | ||||||
|                     ] |                     ] | ||||||
|  |                 }, | ||||||
|  |                 "phpstan": { | ||||||
|  |                     "includes": [ | ||||||
|  |                         "extension.neon" | ||||||
|  |                     ] | ||||||
|                 } |                 } | ||||||
|             }, |             }, | ||||||
|             "autoload": { |             "autoload": { | ||||||
|  | @ -2268,7 +2276,17 @@ | ||||||
|                 "datetime", |                 "datetime", | ||||||
|                 "time" |                 "time" | ||||||
|             ], |             ], | ||||||
|             "time": "2020-03-26T13:04:10+00:00" |             "funding": [ | ||||||
|  |                 { | ||||||
|  |                     "url": "https://opencollective.com/Carbon", | ||||||
|  |                     "type": "open_collective" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", | ||||||
|  |                     "type": "tidelift" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "time": "2020-10-23T06:02:30+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nikic/fast-route", |             "name": "nikic/fast-route", | ||||||
|  | @ -3852,20 +3870,20 @@ | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/polyfill-mbstring", |             "name": "symfony/polyfill-mbstring", | ||||||
|             "version": "v1.15.0", |             "version": "v1.20.0", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/symfony/polyfill-mbstring.git", |                 "url": "https://github.com/symfony/polyfill-mbstring.git", | ||||||
|                 "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" |                 "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", |                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", | ||||||
|                 "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", |                 "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
|                 "php": ">=5.3.3" |                 "php": ">=7.1" | ||||||
|             }, |             }, | ||||||
|             "suggest": { |             "suggest": { | ||||||
|                 "ext-mbstring": "For best performance" |                 "ext-mbstring": "For best performance" | ||||||
|  | @ -3873,7 +3891,11 @@ | ||||||
|             "type": "library", |             "type": "library", | ||||||
|             "extra": { |             "extra": { | ||||||
|                 "branch-alias": { |                 "branch-alias": { | ||||||
|                     "dev-master": "1.15-dev" |                     "dev-main": "1.20-dev" | ||||||
|  |                 }, | ||||||
|  |                 "thanks": { | ||||||
|  |                     "name": "symfony/polyfill", | ||||||
|  |                     "url": "https://github.com/symfony/polyfill" | ||||||
|                 } |                 } | ||||||
|             }, |             }, | ||||||
|             "autoload": { |             "autoload": { | ||||||
|  | @ -3907,7 +3929,21 @@ | ||||||
|                 "portable", |                 "portable", | ||||||
|                 "shim" |                 "shim" | ||||||
|             ], |             ], | ||||||
|             "time": "2020-03-09T19:04:49+00:00" |             "funding": [ | ||||||
|  |                 { | ||||||
|  |                     "url": "https://symfony.com/sponsor", | ||||||
|  |                     "type": "custom" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://github.com/fabpot", | ||||||
|  |                     "type": "github" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | ||||||
|  |                     "type": "tidelift" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "time": "2020-10-23T14:02:19+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/polyfill-php72", |             "name": "symfony/polyfill-php72", | ||||||
|  | @ -4022,6 +4058,86 @@ | ||||||
|             ], |             ], | ||||||
|             "time": "2020-02-27T09:26:54+00:00" |             "time": "2020-02-27T09:26:54+00:00" | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |             "name": "symfony/polyfill-php80", | ||||||
|  |             "version": "v1.20.0", | ||||||
|  |             "source": { | ||||||
|  |                 "type": "git", | ||||||
|  |                 "url": "https://github.com/symfony/polyfill-php80.git", | ||||||
|  |                 "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" | ||||||
|  |             }, | ||||||
|  |             "dist": { | ||||||
|  |                 "type": "zip", | ||||||
|  |                 "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", | ||||||
|  |                 "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", | ||||||
|  |                 "shasum": "" | ||||||
|  |             }, | ||||||
|  |             "require": { | ||||||
|  |                 "php": ">=7.1" | ||||||
|  |             }, | ||||||
|  |             "type": "library", | ||||||
|  |             "extra": { | ||||||
|  |                 "branch-alias": { | ||||||
|  |                     "dev-main": "1.20-dev" | ||||||
|  |                 }, | ||||||
|  |                 "thanks": { | ||||||
|  |                     "name": "symfony/polyfill", | ||||||
|  |                     "url": "https://github.com/symfony/polyfill" | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |             "autoload": { | ||||||
|  |                 "psr-4": { | ||||||
|  |                     "Symfony\\Polyfill\\Php80\\": "" | ||||||
|  |                 }, | ||||||
|  |                 "files": [ | ||||||
|  |                     "bootstrap.php" | ||||||
|  |                 ], | ||||||
|  |                 "classmap": [ | ||||||
|  |                     "Resources/stubs" | ||||||
|  |                 ] | ||||||
|  |             }, | ||||||
|  |             "notification-url": "https://packagist.org/downloads/", | ||||||
|  |             "license": [ | ||||||
|  |                 "MIT" | ||||||
|  |             ], | ||||||
|  |             "authors": [ | ||||||
|  |                 { | ||||||
|  |                     "name": "Ion Bazan", | ||||||
|  |                     "email": "ion.bazan@gmail.com" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "name": "Nicolas Grekas", | ||||||
|  |                     "email": "p@tchwork.com" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "name": "Symfony Community", | ||||||
|  |                     "homepage": "https://symfony.com/contributors" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", | ||||||
|  |             "homepage": "https://symfony.com", | ||||||
|  |             "keywords": [ | ||||||
|  |                 "compatibility", | ||||||
|  |                 "polyfill", | ||||||
|  |                 "portable", | ||||||
|  |                 "shim" | ||||||
|  |             ], | ||||||
|  |             "funding": [ | ||||||
|  |                 { | ||||||
|  |                     "url": "https://symfony.com/sponsor", | ||||||
|  |                     "type": "custom" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://github.com/fabpot", | ||||||
|  |                     "type": "github" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | ||||||
|  |                     "type": "tidelift" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "time": "2020-10-23T14:02:19+00:00" | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/process", |             "name": "symfony/process", | ||||||
|             "version": "v5.0.7", |             "version": "v5.0.7", | ||||||
|  | @ -4131,21 +4247,22 @@ | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/translation", |             "name": "symfony/translation", | ||||||
|             "version": "v5.0.7", |             "version": "v5.1.8", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/symfony/translation.git", |                 "url": "https://github.com/symfony/translation.git", | ||||||
|                 "reference": "99b831770e10807dca0979518e2c89edffef5978" |                 "reference": "27980838fd261e04379fa91e94e81e662fe5a1b6" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/symfony/translation/zipball/99b831770e10807dca0979518e2c89edffef5978", |                 "url": "https://api.github.com/repos/symfony/translation/zipball/27980838fd261e04379fa91e94e81e662fe5a1b6", | ||||||
|                 "reference": "99b831770e10807dca0979518e2c89edffef5978", |                 "reference": "27980838fd261e04379fa91e94e81e662fe5a1b6", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
|                 "php": "^7.2.5", |                 "php": ">=7.2.5", | ||||||
|                 "symfony/polyfill-mbstring": "~1.0", |                 "symfony/polyfill-mbstring": "~1.0", | ||||||
|  |                 "symfony/polyfill-php80": "^1.15", | ||||||
|                 "symfony/translation-contracts": "^2" |                 "symfony/translation-contracts": "^2" | ||||||
|             }, |             }, | ||||||
|             "conflict": { |             "conflict": { | ||||||
|  | @ -4175,11 +4292,6 @@ | ||||||
|                 "symfony/yaml": "" |                 "symfony/yaml": "" | ||||||
|             }, |             }, | ||||||
|             "type": "library", |             "type": "library", | ||||||
|             "extra": { |  | ||||||
|                 "branch-alias": { |  | ||||||
|                     "dev-master": "5.0-dev" |  | ||||||
|                 } |  | ||||||
|             }, |  | ||||||
|             "autoload": { |             "autoload": { | ||||||
|                 "psr-4": { |                 "psr-4": { | ||||||
|                     "Symfony\\Component\\Translation\\": "" |                     "Symfony\\Component\\Translation\\": "" | ||||||
|  | @ -4204,24 +4316,38 @@ | ||||||
|             ], |             ], | ||||||
|             "description": "Symfony Translation Component", |             "description": "Symfony Translation Component", | ||||||
|             "homepage": "https://symfony.com", |             "homepage": "https://symfony.com", | ||||||
|             "time": "2020-03-27T16:56:45+00:00" |             "funding": [ | ||||||
|  |                 { | ||||||
|  |                     "url": "https://symfony.com/sponsor", | ||||||
|  |                     "type": "custom" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://github.com/fabpot", | ||||||
|  |                     "type": "github" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | ||||||
|  |                     "type": "tidelift" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "time": "2020-10-24T12:01:57+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/translation-contracts", |             "name": "symfony/translation-contracts", | ||||||
|             "version": "v2.0.1", |             "version": "v2.3.0", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/symfony/translation-contracts.git", |                 "url": "https://github.com/symfony/translation-contracts.git", | ||||||
|                 "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" |                 "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", |                 "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e2eaa60b558f26a4b0354e1bbb25636efaaad105", | ||||||
|                 "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", |                 "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
|                 "php": "^7.2.5" |                 "php": ">=7.2.5" | ||||||
|             }, |             }, | ||||||
|             "suggest": { |             "suggest": { | ||||||
|                 "symfony/translation-implementation": "" |                 "symfony/translation-implementation": "" | ||||||
|  | @ -4229,7 +4355,11 @@ | ||||||
|             "type": "library", |             "type": "library", | ||||||
|             "extra": { |             "extra": { | ||||||
|                 "branch-alias": { |                 "branch-alias": { | ||||||
|                     "dev-master": "2.0-dev" |                     "dev-master": "2.3-dev" | ||||||
|  |                 }, | ||||||
|  |                 "thanks": { | ||||||
|  |                     "name": "symfony/contracts", | ||||||
|  |                     "url": "https://github.com/symfony/contracts" | ||||||
|                 } |                 } | ||||||
|             }, |             }, | ||||||
|             "autoload": { |             "autoload": { | ||||||
|  | @ -4261,7 +4391,21 @@ | ||||||
|                 "interoperability", |                 "interoperability", | ||||||
|                 "standards" |                 "standards" | ||||||
|             ], |             ], | ||||||
|             "time": "2019-11-18T17:27:11+00:00" |             "funding": [ | ||||||
|  |                 { | ||||||
|  |                     "url": "https://symfony.com/sponsor", | ||||||
|  |                     "type": "custom" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://github.com/fabpot", | ||||||
|  |                     "type": "github" | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", | ||||||
|  |                     "type": "tidelift" | ||||||
|  |                 } | ||||||
|  |             ], | ||||||
|  |             "time": "2020-09-28T13:05:58+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "symfony/var-dumper", |             "name": "symfony/var-dumper", | ||||||
|  | @ -4795,6 +4939,7 @@ | ||||||
|                 "faker", |                 "faker", | ||||||
|                 "fixtures" |                 "fixtures" | ||||||
|             ], |             ], | ||||||
|  |             "abandoned": true, | ||||||
|             "time": "2019-12-12T13:22:17+00:00" |             "time": "2019-12-12T13:22:17+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
| //$router->get('/', function () use ($router) {
 | //$router->get('/', function () use ($router) {
 | ||||||
| //    return $router->app->version();
 | //    return $router->app->version();
 | ||||||
| //});
 | //});
 | ||||||
| 
 | $router->get('time', 'HelperController@getCurrentTimeB'); | ||||||
| $router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($router) { | $router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($router) { | ||||||
| // Helper routes
 | // Helper routes
 | ||||||
|     $router->post('receivePayment', 'TransmittingNetworksController@receivePayment'); |     $router->post('receivePayment', 'TransmittingNetworksController@receivePayment'); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue