wip check offres for newsletter

This commit is contained in:
asus
2024-03-11 23:20:38 +01:00
parent 046b31579c
commit 591add448f
4 changed files with 151 additions and 1 deletions

View File

@@ -172,6 +172,7 @@ function failure_payment_for_user_CIPF($user_id, $order_id, $status) {
*/
function validate_payment_for_user_CIPF($user_id, $order_id) {
PLGNTLS_class::debug_infos();
$acf_card_state = PLGNTLS_class::ACF_CARD_STATE;
$acf_card_expiration = PLGNTLS_class::ACF_CARD_EXPIRATION;
$acf_card_number = PLGNTLS_class::ACF_CARD_NUMBER;
@@ -179,6 +180,12 @@ function validate_payment_for_user_CIPF($user_id, $order_id) {
$prof_is_activ = PLGNTLS_class::ACF_PROF_IS_ACTIV;
$acf_payment_status = PLGNTLS_class::ACF_CARD_PAYMENT_STATE;
$meta_order_id = PLGNTLS_class::META_ORDER_ID;
/*
$acf_cgv = PLGNTLS_class::ACF_PROF_CGV;
$acf_payement = PLGNTLS_class::ACF_CARD_PAYMENT_METHOD;
$acf_delivery = PLGNTLS_class::ACF_CARD_PRICE_DELIVERY;
$acf_price = PLGNTLS_class::ACF_CARD_PRICE_CHOICE;
*/
$acf_id = 'user_'.$user_id;
@@ -256,6 +263,22 @@ function validate_payment_for_user_CIPF($user_id, $order_id) {
*/
update_field($prof_is_activ['_name'], $prof_is_activ['activ'], $acf_id);
update_field($acf_payment_status['_name'], $acf_payment_status['success'], $acf_id);
/*
* reset some fields for the form to buy the card
* - cgv
* - paiement
* - livraison
* - tarif
*
* could make sense to put it here,
* but actually it needs to be put at begining of form
*
update_field($acf_cgv['_name'] , array(""), 'user_'.$user_id);
update_field($acf_payement['_name'], array(""), 'user_'.$user_id);
update_field($acf_delivery['_name'], array(""), 'user_'.$user_id);
update_field($acf_price['_name'] , array(""), 'user_'.$user_id);
*/
}