From 257ff33d83c20760a1fc30bbc392355779b54c85 Mon Sep 17 00:00:00 2001 From: Ruben Ramirez Date: Fri, 4 Apr 2025 03:28:01 -0500 Subject: [PATCH] More Stripe Troubleshooting --- src/Gateways/StripeGateway.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Gateways/StripeGateway.php b/src/Gateways/StripeGateway.php index bb65975..de5c8d6 100644 --- a/src/Gateways/StripeGateway.php +++ b/src/Gateways/StripeGateway.php @@ -1,3 +1,7 @@ + + + + ['card'], @@ -83,7 +101,11 @@ class StripeGateway { // Redirect to Stripe Checkout if ( isset( $session->url ) ) { + \log_to_file('StripeGateway::initiatePayment - Session created. Redirecting to: ' . $session->url); + error_log("Quiztech StripeGateway: Attempting redirect to Stripe URL: " . $session->url); wp_safe_redirect( $session->url ); + // If execution reaches here, exit() failed or was bypassed. + error_log("Quiztech StripeGateway: CRITICAL - Execution continued after wp_safe_redirect and before exit()."); exit; } else { return new WP_Error( 'stripe_session_error', __( 'Could not create Stripe Checkout session.', 'quiztech' ) ); @@ -143,4 +165,4 @@ class StripeGateway { error_log('StripeGateway::handleWebhook called - This method is deprecated.'); return false; // Indicate not handled here } -} \ No newline at end of file +}