- wip payment
- already solved success and failure messages and redirection - solved increase date multiple times - users redirection works if error AND partner to posts instead of project
This commit is contained in:
@@ -17,16 +17,12 @@ const CONSOLE_OFF = true;
|
||||
*/
|
||||
const FIPFCARD_CONSOLE_OFF = false;
|
||||
|
||||
/*
|
||||
* a variable that will contain the name of the first script enqueued
|
||||
*/
|
||||
$fipfcard_first_script = null;
|
||||
|
||||
|
||||
/*
|
||||
* path to ajax.js file, from root of js dir
|
||||
* redirections users
|
||||
*/
|
||||
$fipfcard_ajax_file = "utils/ajax.js";
|
||||
const PROF_PARTENAIRE_REDIRECTION_PAGE = 'redirection_cipf';
|
||||
define('PROF_PARTENAIRE_REDIRECTION_URL', home_url() . '/' . PROF_PARTENAIRE_REDIRECTION_PAGE);
|
||||
|
||||
|
||||
/*
|
||||
@@ -51,4 +47,34 @@ const PAYPAL_CLIENT_SECRET = "EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiR
|
||||
*/
|
||||
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