wip emails front admin menu
This commit is contained in:
@@ -29,6 +29,7 @@ function add_plugin_content_CIPF() {
|
||||
Plgntls::debug_infos();
|
||||
$option_paypal_object = Cipf::OPTION_PAYPAL;
|
||||
$option_payment_object = Cipf::OPTION_PAYMENT;
|
||||
$option_emails_object = Cipf::OPTION_EMAILS;
|
||||
|
||||
/*
|
||||
* options
|
||||
@@ -38,6 +39,8 @@ function add_plugin_content_CIPF() {
|
||||
$option_paypal = Plgntls::get_option_safe($option_paypal_object);
|
||||
$option_payment_name = $option_payment_object['_name'];
|
||||
$option_payment = Plgntls::get_option_safe($option_payment_object);
|
||||
$option_emails_name = $option_emails_object['_name'];
|
||||
$option_emails = Plgntls::get_option_safe($option_emails_object);
|
||||
|
||||
ob_start();
|
||||
include(Plgntls::root_path() . '/html/menu/cipf_menu.html');
|
||||
@@ -157,5 +160,90 @@ function update_paypal_credentials_CIPF($request, $option_name, $option_data, $o
|
||||
|
||||
|
||||
|
||||
function update_emails_settings_option_CIPF($request, $option_name, $option_data, $option_default) {
|
||||
Plgntls::debug_infos();
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
error_log("request: " . json_encode($request));
|
||||
error_log("option_data: " . json_encode($option_data));
|
||||
foreach ($option_data as $email => $email_options) {
|
||||
error_log("email: " . $email);
|
||||
error_log("email_options: " . json_encode($email_options));
|
||||
if (isset($request[$email])) {
|
||||
error_log("email is set");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// $is_sandbox = false;
|
||||
// if (!isset($request['sandbox_or_live'])) {
|
||||
// return;
|
||||
// }
|
||||
// if ($request['sandbox_or_live'] === 'sandbox') {
|
||||
// $is_sandbox = true;
|
||||
// }
|
||||
// else if ($request['sandbox_or_live'] === 'live') {
|
||||
// $is_sandbox = false;
|
||||
// }
|
||||
// else {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /*
|
||||
// * client id
|
||||
// *
|
||||
// */
|
||||
// $client_id = '';
|
||||
// if (!isset($request['client_id'])) {
|
||||
// return;
|
||||
// }
|
||||
// else {
|
||||
// $client_id = $request['client_id'];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /*
|
||||
// * client secret
|
||||
// *
|
||||
// */
|
||||
// $client_secret = '';
|
||||
// if (!isset($request['client_secret'])) {
|
||||
// return;
|
||||
// }
|
||||
// else {
|
||||
// $client_secret = $request['client_secret'];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /*
|
||||
// * update the option with new credentials
|
||||
// *
|
||||
// set_paypal_options_CIPF($is_sandbox, $client_id, $client_secret);
|
||||
// */
|
||||
// $data = array(
|
||||
// 'is_sandbox' => $is_sandbox,
|
||||
// 'client_id' => $client_id,
|
||||
// 'client_secret' => $client_secret,
|
||||
// );
|
||||
// Plgntls::update_option_safe($option_name, $data);
|
||||
}
|
||||
|
||||
/*
|
||||
'payment_success'=>[
|
||||
'notification_send'=>true,
|
||||
'notification_to'=>'$$__admin_email__$$',
|
||||
'notification_subject'=>"paiement réussi",
|
||||
'notification_message'=>"par ici la monnaie",
|
||||
'confirmation_send'=>true,
|
||||
'confirmation_subject'=>"paiement réussi",
|
||||
'confirmation_message'=>"donne l'argent",
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user