From fea195638b72f9c3aa9ad0f92dbaa981cc6dd7f9 Mon Sep 17 00:00:00 2001 From: asus Date: Thu, 22 Feb 2024 23:44:22 +0100 Subject: [PATCH] sdk call works now, just the begining --- plugins/fipfcard_plugin/fipfcard_plugin.php | 39 ++++++++++++++++++--- private | 2 +- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/plugins/fipfcard_plugin/fipfcard_plugin.php b/plugins/fipfcard_plugin/fipfcard_plugin.php index faeb820..aaeb684 100644 --- a/plugins/fipfcard_plugin/fipfcard_plugin.php +++ b/plugins/fipfcard_plugin/fipfcard_plugin.php @@ -164,7 +164,9 @@ add_shortcode('custom_frontend_posting_form', 'custom_frontend_posting_form'); function check_paypal_request() { error_log("----"); - if (is_page('test_paypal_ok')) + if (is_page('test_paypal_payment')) + error_log("on test_paypal_payment"); + else if (is_page('test_paypal_ok')) error_log("on test_paypal_ok"); else if (is_page('test_paypal_infos')) error_log("on test_paypal_infos"); @@ -174,11 +176,17 @@ function check_paypal_request() error_log(json_encode($_GET)); error_log("_POST"); error_log(json_encode($_POST)); +// error_log("_COOKIE"); +// error_log(json_encode($_COOKIE)); } add_action('template_redirect', 'check_paypal_request'); function paypal_shortcode_content() { +/* + + +*/ $pp_live_client_id = "Aedn5e8z__hPBvKirqw5bwlhI9ChG8_N6c1xbgybYyBr4B4oP8uVzmVdH1QVKdPQKf6bWg7orPV4PDrO"; $pp_sandbox_client_id = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl"; $pp_client_id = $pp_live_client_id; @@ -186,19 +194,40 @@ function paypal_shortcode_content() $pp_sdk_currency = "EUR"; $pp_sdk_debug = "true"; - $pp_sdk_base_url="https://www.paypal.com"; $pp_sdk_base_url="https://sandbox.paypal.com"; + $pp_sdk_base_url="https://www.paypal.com"; $pp_sdk_client_token="abc123xyz=="; $pp_sdk_src="$pp_sdk_base_url/sdk/js?client-id=$pp_client_id¤cy=$pp_sdk_currency&debug=$pp_sdk_debug"; + $pp_sdk_src="$pp_sdk_base_url/sdk/js?client-id=$pp_client_id"; $pp_sdk_attributes="src='$pp_sdk_src' data-client-token='$pp_sdk_client_token'"; + $pp_sdk_attributes="src='$pp_sdk_src'"; + $pp_sdk_html_script=""; ob_start(); ?> - +

old button :

+
+ + + + +
+

new button :

+ +