'etat_carte', 'new'=>'Commande', 'renew'=>'Renouvellement']; // radio button const ACF_CARD_PAYMENT_METHOD = ['_name'=>'paiement', 'paypal'=>'Paypal', 'transfert'=>'Virement']; // radio button const ACF_CARD_PRICE_CHOICE = ['_name'=>'tarif', 'low'=>'10', 'high'=>'15']; // radio button const ACF_CARD_PRICE_DELIVERY = ['_name'=>'livraison', 'pdf'=>'0', 'post'=>'5']; // radio button const ACF_PROF_IS_ACTIV = ['_name'=>'compte-actif', 'activ'=>'Actif', 'inactiv'=>'Inactif']; // radio button const ACF_PROF_CGV = ['_name'=>'cgv', 'cgv'=>'cgv']; // checkbox const ACF_CARD_PRICE_TOTAL = ['_name'=>'somme_a_regler']; // number const ACF_CARD_NUMBER = ['_name'=>'numero_de_la_carte']; // number const ACF_CARD_EXPIRATION = ['_name'=>'fin_de_validite']; // date picker const ACF_CARD_PAYMENT_STATE = ['_name'=>'etat_paiement', 'started'=>'en_cours', 'success'=>'reussi', 'failure'=>'echec', 'nothing'=>'aucun']; // radio button const ACF_ACCOUNT_STATE = ['_name'=>'etat_compte', 'new'=>'nouveau prof', 'to_pay'=>'doit payer', 'valid'=>'carte valide', 'waiting_invalid'=>'en attente invalide', 'waiting_valid'=>'en attente valide', 'expired'=>'carte expiree']; const ACF_TRANSFERT_STATE = ['_name'=>'etat_virement', 'success'=>'virement validé']; const ACF_PAGE_STATE = ['_name'=>'etat_page_partenaire', 'publish'=>'Publiee', 'draft'=>'Brouillon']; const ACF_CARD_ORDER_ID = ['_name'=>'order_id']; const ACF_HISTORY = ['_name'=>'history']; // META const META_PAYEMENT_STATUS = 'cipf_payement_status'; const META_ORDER_ID = 'cipf_order_id'; // SLUG const SLUG_PROF_INACTIV = 'validation-en-cours'; const SLUG_COMMAND_CARD = 'commande'; const SLUG_PAGE_REDIRECTION = 'redirection_cipf'; const SLUG_PAYPAL_PAGE = 'paiement'; const SLUG_PAYPAL_REDIRECTION_SUCCESS = self::SLUG_PAGE_REDIRECTION; const SLUG_PAYPAL_REDIRECTION_FAILURE = self::SLUG_PAGE_REDIRECTION; const SLUG_ADMIN_VALIDATE_PROF = 'admin_activate_prof_cipf'; // for admin_modif_prof.php const SLUG_PARTNER_REGISTRATION = 'compte-partenaire'; const SLUG_PARTNER_CREATE_PAGE = 'ma-page-partenaire'; // URL const URL_BASE_REST_ROUTE = 'cipf_plugin/api/v1'; // for routes, in php/paypal/routes.php && php/admin_modif_prof.php // QUERY const QUERY_TOGGLE_PARTNER_PAGE = 'toggle_partner_page_cipf'; // PAYPAL const PAYPAL_SBOX_API_BASE_URL = "https://api-m.sandbox.paypal.com"; const PAYPAL_LIVE_API_BASE_URL = "https://api-m.paypal.com"; const PAYPAL_HUGO_SBOX_CLIENT_ID = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl"; const PAYPAL_HUGO_SBOX_CLIENT_SECRET = "EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiRSFD-ql4tvnulKJw6TitZ-vU-ytc4A-"; const PAYPAL_HUGO_LIVE_CLIENT_ID = "Aedn5e8z__hPBvKirqw5bwlhI9ChG8_N6c1xbgybYyBr4B4oP8uVzmVdH1QVKdPQKf6bWg7orPV4PDrO"; const PAYPAL_HUGO_LIVE_CLIENT_SECRET = "EGeGwfHGxHxsjnC-tH8W0IL4nN3_xlc3sXFRPCQOw5uUoWae3eOgghuDKMnZc5DVGTbP6yIjVJ1BaAra"; const PAYPAL_DIEGO_SBOX_CLIENT_ID = "AegZZ6vDrTBzUNGf-UOVoUwh51YU4cvjGGPQkOQ7gM3H2xij9Pdkf751WO1ZvLoFjqbeNN-M5F6WqrdL"; const PAYPAL_DIEGO_SBOX_CLIENT_SECRET = "ENH2n-trvWrs4B6IWdhl7NM_Wp-Rpyo5ONJJMjJFevGVJ2wtSdORPXFx-vPZ2RQGV0RUQzAp6qt4_qVn"; const PAYPAL_DIEGO_LIVE_CLIENT_ID = "Abp6y2Outx8bMsEQRXBjH7qYK7-sTHmCMWlmJcw0Ctl5c9XpNsbGt5Vl1tD1ZmFhuBGGjT8ec3FKoLCo"; const PAYPAL_DIEGO_LIVE_CLIENT_SECRET = "EFLFOATSMM1m9BZwfj209qAeYDrsH-ltcFnVBmyPAJM-KjQiMtUVDQNPeyikDO1Y41yMiKu_IoELp_vD"; //const PAYPAL_CLIENT_ID = self::PAYPAL_HUGO_LIVE_CLIENT_ID; //const PAYPAL_CLIENT_SECRET = self::PAYPAL_HUGO_LIVE_CLIENT_SECRET; //const PAYPAL_API_BASE_URL = self::PAYPAL_HUGO_LIVE_API_BASE_URL; const PAYPAL_MESSAGE_SUCCESS = 'Paiement réussi, vous allez être redirigé-es vers votre espace'; const PAYPAL_MESSAGE_PROBLEM = "Paiement réussi, mais une erreure est survenue dans le traitement de la commande, si vous voyez que votre compte n'est pas mis à jour correctement, contactez la fipf directement"; const PAYPAL_MESSAGE_FAILURE = 'Paiement raté, vous allez être redirigé-es vers votre espace'; // ROLES const ROLE_PROF = 'professeur__professeure'; const ROLE_PARTNER = 'partenaire'; const ROLE_FIPF = 'fipf'; const ROLE_ADMIN = 'administrator'; // SHORTCODES // OPTIONS const OPTION_PAYPAL = [ '_name'=>'cipf_paypal_credentials', '_callback'=>'update_paypal_credentials_CIPF', '_default' => [ 'is_sandbox' =>true, 'client_id' =>'AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl', 'client_secret'=>'EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiRSFD-ql4tvnulKJw6TitZ-vU-ytc4A-', ], ]; const OPTION_PAYMENT = [ '_name'=>'cipf_payment_messages', '_callback'=>'update_payment_messages_option_CIPF', '_default'=>[ 'success'=> 'Paiement réussi, vous allez être redirigés vers votre espace', 'failure'=> 'Paiement échoué, vous allez être redirigés vers votre espace', 'problem'=> "Paiement réussi, mais une erreur est survenue dans le traitement de la commande, si vous voyez que votre compte n'est pas mis à jour correctement, contactez la fipf directement", ], ]; const OPTION_EMAILS = [ '_name'=>'cipf_emails_option', '_callback'=>'update_emails_settings_option_CIPF', '_default'=>[ 'payment_success'=>[ 'name'=>'prof - le paiement a réussi', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - paiement réussi]", 'notification_message'=>'paiement réussi de la part de $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - paiement réussi]", 'confirmation_message'=>"paiement réussi", ], 'payment_echec'=>[ 'name'=>'prof - le paiement a echoué', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - paiement echoué]", 'notification_message'=>'paiement echoué pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - paiement echoué]", 'confirmation_message'=>"votre paiement a echoué", ], 'payment_problem'=>[ 'name'=>'prof - le paiement a rencontré un problem', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - paiement probleme]", 'notification_message'=>'probleme de paiement pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>false, 'confirmation_subject'=>"[CIPF - paiement problème]", 'confirmation_message'=>"votre paiement a rencontré un probleme", ], 'transfert_success'=>[ 'name'=>'prof - le virement a été validé', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - virement validé]", 'notification_message'=>'virement validé pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - virement validé]", 'confirmation_message'=>"votre virement a été validé", ], 'account_deleted'=>[ 'name'=>'prof - le compte a été supprimé', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - compte supprimé]", 'notification_message'=>'compte supprimé pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - compte supprimé]", 'confirmation_message'=>'votre compte a été supprimé sur $$__base_url__$$', ], 'account_will_expire'=>[ 'name'=>'prof - la carte va bientot expirer', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - carte va expirer]", 'notification_message'=>'la carte va expirer pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - carte va expirer]", 'confirmation_message'=>'votre carte va expirer bientot, renouvellez-la sur $$__base_url__$$', ], 'account_expired'=>[ 'name'=>'prof - la carte a expiré', 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /prof - carte expirée]", 'notification_message'=>'carte expirée pour $$user_login$$ : $$__author_page_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - carte expirée]", 'confirmation_message'=>'votre carte a expiré, renouvelez-la sur $$__base_url__$$', ], 'offer_will_expire'=>[ 'name'=>"partenaire - l'offre arrive bientot a expiration", 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /partenaire - offre va expirer]", 'notification_message'=>'offre va expirer pour $$user_login$$ : $$__user_post_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - offre va expirer]", 'confirmation_message'=>'une de vos offre va expirer, rendez-vous sur $$__base_url__$$', ], 'offer_expired'=>[ 'name'=>"partenaire - l'offre partenaire a expirée", 'notification_send'=>true, 'notification_to'=>'$$__admin_email__$$', 'notification_subject'=>"[CIPF /partenaire - offre expirée]", 'notification_message'=>'offre expirée pour $$user_login$$ : $$__user_post_url__$$', 'confirmation_send'=>true, 'confirmation_subject'=>"[CIPF - offre expirée]", 'confirmation_message'=>'votre offre a expiré, pour la renouveler rendez-vous sur $$__base_url__$$', ], ], ]; // ADMIN MENU const SLUG_TOOGLE_ADMIN_MENU = ['_name'=>'toogle_admin_menu_url_cipf', 'toggle'=>'toggle', 'show'=>'show', 'hide'=>'hide']; const TOGGLE_ADMIN_MENU = ['_name'=>'toggle_admin_menu_option_cipf', 'show'=>'show', 'hide'=>'hide']; const ADMIN_POST_PAYPAL = 'paypal_credentials_CIPF'; const ADMIN_MENU_NONCE_PAYPAL = ['_name'=>'nonce_paypal_cipf', '_action'=>'action_admin_menu_paypal_cipf']; const ADMIN_POST_EMAIL_REGISTRATION = 'email_registration_message_CIPF'; const ADMIN_MENU_NONCE_EMAIL_REGISTRATION = ['_name'=>'nonce_email_cipf', '_action'=>'action_admin_menu_email_registration_cipf']; const ADMIN_POST_PAYMENT_MESSAGES = 'payment_messages_CIPF'; const ADMIN_MENU_NONCE_PAYMENT_MESSAGES = ['_name'=>'nonce_payment_cipf', '_action'=>'action_admin_menu_payment_messages_cipf']; // FORMS const FORM_PROF_COMMANDE_ID = 'prof_commande'; const FORM_PROF_TRANSFERT_ID = 'prof_valide_virement'; // DURATIONS const DURATION_CARD_VALIDITY = '+1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days') const DURATION_OLD_ORDER_ID = '+3 days'; const DURATION_ACCOUNT_DELETE_AFTER_EXPIRE = '+6 months'; const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_FIRST = '-1 month'; const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_LAST = '-7 days'; const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_FIRST = '-1 month'; const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_LAST = '-7 days'; const DURATION_REMINDER_BEFORE_OFFER_EXPIRE = '-7 days'; // OTHER const CARD_RENEW_PERIOD = 31; // int : number of days before expiration when renew card start to be possible const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php) const ADMIN_VALIDATE_PROF_FIELD = 'admin_activate_prof_cipf'; // for admin_modif_prof.php const INPUT_HIDDEN_ROLE = 'cipf_user_role'; } ?>