changed plugin name to cipf
This commit is contained in:
80
plugins/cipf_plugin/php/utils/globals.php
Normal file
80
plugins/cipf_plugin/php/utils/globals.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
/*
|
||||
* globals variables
|
||||
* const vs define : https://stackoverflow.com/questions/2447791/php-define-vs-const
|
||||
*/
|
||||
|
||||
/* switch console_log
|
||||
const CONSOLE_OFF = true;
|
||||
*/
|
||||
const CIPF_CONSOLE_OFF = false;
|
||||
|
||||
|
||||
/*
|
||||
* redirections users
|
||||
*/
|
||||
const PROF_PARTENAIRE_REDIRECTION_PAGE = 'redirection_cipf';
|
||||
define('PROF_PARTENAIRE_REDIRECTION_URL', home_url() . '/' . PROF_PARTENAIRE_REDIRECTION_PAGE);
|
||||
|
||||
|
||||
/*
|
||||
* paypal credentials
|
||||
*
|
||||
* LIVE :
|
||||
*
|
||||
* const PAYPAL_CLIENT_ID = "Aedn5e8z__hPBvKirqw5bwlhI9ChG8_N6c1xbgybYyBr4B4oP8uVzmVdH1QVKdPQKf6bWg7orPV4PDrO";
|
||||
* const PAYPAL_CLIENT_SECRET = "EGeGwfHGxHxsjnC-tH8W0IL4nN3_xlc3sXFRPCQOw5uUoWae3eOgghuDKMnZc5DVGTbP6yIjVJ1BaAra";
|
||||
*
|
||||
* SANBOX :
|
||||
*
|
||||
* const PAYPAL_CLIENT_ID = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl";
|
||||
* const PAYPAL_CLIENT_SECRET = "EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiRSFD-ql4tvnulKJw6TitZ-vU-ytc4A-";
|
||||
*
|
||||
*/
|
||||
const PAYPAL_CLIENT_ID = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl";
|
||||
const PAYPAL_CLIENT_SECRET = "EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiRSFD-ql4tvnulKJw6TitZ-vU-ytc4A-";
|
||||
|
||||
/*
|
||||
* paypal api base url
|
||||
*/
|
||||
const PAYPAL_API_BASE_URL = "https://api-m.sandbox.paypal.com";
|
||||
|
||||
/*
|
||||
* paypal redirections
|
||||
*/
|
||||
const PAYPAL_REDIRECTION_SUCCESS = PROF_PARTENAIRE_REDIRECTION_URL;
|
||||
const PAYPAL_REDIRECTION_FAILURE = PROF_PARTENAIRE_REDIRECTION_URL;
|
||||
|
||||
/*
|
||||
* paypal messages
|
||||
* put the message betweeen backticks `message` and then between single quotes '`message`'
|
||||
* because it will be evaluated in front by js, so it need something to evaluate, in ``
|
||||
* you can then use variables available in the context of execution : '`Transaction ${transaction.status}`'
|
||||
* is it good strategy ? idk
|
||||
|
||||
const PAYPAL_MESSAGE_SUCCESS = '`Transaction ${transaction.status}: ${transaction.id}<br><br>See console for all available details`';
|
||||
const PAYPAL_MESSAGE_FAILURE = '`Sorry, your transaction could not be processed...<br><br>${error}`';
|
||||
|
||||
*/
|
||||
const PAYPAL_MESSAGE_SUCCESS = '`paiement reussi`';
|
||||
const PAYPAL_MESSAGE_FAILURE = '`paiement raté`';
|
||||
|
||||
/*
|
||||
* acf fields for card :
|
||||
* - card_is_valid : has valid card
|
||||
* - card_date_purchase : date of purchase
|
||||
* - card_date_validity : date end of validity
|
||||
*/
|
||||
const CARD_IS_VALID = 'carte_est_valide';
|
||||
const CARD_DATE_PURCHASE = 'date_d_achat';
|
||||
const CARD_DATE_VALIDITY = 'date_fin_validite';
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user