added redirection without need of a page, use it for paypal success or failure message already
This commit is contained in:
@@ -76,12 +76,16 @@ class PLGNTLS_class
|
||||
const META_PAYEMENT_STATUS = 'cipf_payement_status';
|
||||
const META_ORDER_ID = 'cipf_order_id';
|
||||
|
||||
// SLUG
|
||||
// SLUG & URL & QUERY
|
||||
const SLUG_PROF_INACTIV = 'validation-en-cours';
|
||||
const SLUG_RENEW_CARD = 'commande';
|
||||
const SLUG_PAGE_REDIRECTION = 'redirection_cipf';
|
||||
const SLUG_PAYPAL_REDIRECTION_SUCCESS = self::SLUG_PAGE_REDIRECTION;
|
||||
const SLUG_PAYPAL_REDIRECTION_FAILURE = self::SLUG_PAGE_REDIRECTION;
|
||||
// const SLUG_PAYPAL_REDIRECTION_SUCCESS = self::SLUG_PAGE_REDIRECTION;
|
||||
// const SLUG_PAYPAL_REDIRECTION_FAILURE = self::SLUG_PAGE_REDIRECTION;
|
||||
const SLUG_PAYPAL_REDIRECTION_SUCCESS = '?'.self::QUERY_REDIRECTION_PROFIL;
|
||||
const SLUG_PAYPAL_REDIRECTION_FAILURE = '?'.self::QUERY_REDIRECTION_PROFIL;
|
||||
const URL_BASE_REST_ROUTE = 'cipf_plugin/api/v1'; // for routes, in php/paypal/routes.php && php/admin_modif_prof.php
|
||||
const QUERY_REDIRECTION_PROFIL = 'redirection_cipf';
|
||||
|
||||
// PAYPAL
|
||||
const PAYPAL_CLIENT_ID = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl";
|
||||
@@ -101,7 +105,6 @@ class PLGNTLS_class
|
||||
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 = 'cipf_admin_activate_prof'; // for admin_modif_prof.php
|
||||
const BASE_REST_ROUTE = 'cipf_plugin/api/v1'; // for routes, in php/paypal/routes.php && php/admin_modif_prof.php
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
/**
|
||||
* this file is there for scripts that uses modules import
|
||||
*/
|
||||
/*
|
||||
* this file is there for scripts that uses modules import
|
||||
*
|
||||
*/
|
||||
export function PLGNTLS_fetch(url, options = {}) {
|
||||
console.log("inside PLGNTLS_fetch");
|
||||
url = PLGNTLS_data.fetch_url + url;
|
||||
@@ -13,9 +14,10 @@ export function PLGNTLS_fetch(url, options = {}) {
|
||||
return fetch(url, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* For non-module scripts, attach to the global scope
|
||||
*/
|
||||
/*
|
||||
* For non-module scripts, attach to the global scope
|
||||
*
|
||||
*/
|
||||
if (typeof window !== 'undefined') {
|
||||
window.PLGNTLS_fetch = PLGNTLS_fetch;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user