v 0.3.10 admin can validate payment from front

This commit is contained in:
asus
2024-03-20 11:42:22 +01:00
parent 58f287f00f
commit 0717a7d9e4
6 changed files with 92 additions and 16 deletions

View File

@@ -71,6 +71,7 @@ class PLGNTLS_class {
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é'];
// META
const META_PAYEMENT_STATUS = 'cipf_payement_status';
@@ -116,16 +117,20 @@ class PLGNTLS_class {
// OPTIONS
const OPTION_PARTNER_SLUG = ['_name'=>'cipf_partner_slug', 'true'=>'true', 'false'=>'false'];
// 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'];
// FORMS
const FORM_PROF_COMMANDE_ID = 'prof_commande';
const FORM_PROF_TRANSFERT_ID = 'prof_valide_virement';
// OTHER
const CARD_RENEW_PERIOD = 31; // int : number of days before expiration when renew card start to be possible
const CARD_VALIDITY_TIME = '1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days')
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
// 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'];
private static $_DEBUG_INFOS = false;
private static $_plugin_dir_path;