Changeset 3433172
- Timestamp:
- 01/06/2026 02:41:46 AM (8 days ago)
- Location:
- payment-gateway-stripe-and-woocommerce-integration/trunk
- Files:
-
- 2 deleted
- 26 edited
-
includes/admin/class-stripe-admin-handler.php (modified) (14 diffs)
-
includes/class-eh-security-helper.php (modified) (1 diff)
-
includes/class-eh-stripe-token-handler.php (modified) (13 diffs)
-
includes/class-gateway-stripe-alipay.php (modified) (1 diff)
-
includes/class-stripe-afterpay.php (modified) (1 diff)
-
includes/class-stripe-api.php (modified) (6 diffs)
-
includes/class-stripe-apple-pay.php (modified) (1 diff)
-
includes/class-stripe-bacs.php (modified) (1 diff)
-
includes/class-stripe-bancontact.php (modified) (1 diff)
-
includes/class-stripe-becs.php (modified) (1 diff)
-
includes/class-stripe-boleto.php (modified) (1 diff)
-
includes/class-stripe-checkout.php (modified) (4 diffs)
-
includes/class-stripe-eps.php (modified) (1 diff)
-
includes/class-stripe-general-settings.php (modified) (5 diffs)
-
includes/class-stripe-ideal.php (modified) (1 diff)
-
includes/class-stripe-klarna.php (modified) (2 diffs)
-
includes/class-stripe-oauth.php (modified) (6 diffs)
-
includes/class-stripe-oxxo.php (modified) (1 diff)
-
includes/class-stripe-p24.php (modified) (1 diff)
-
includes/class-stripe-payment-request-tab.php (modified) (1 diff)
-
includes/class-stripe-sepa-pay.php (modified) (2 diffs)
-
includes/class-stripe-wechat.php (modified) (1 diff)
-
includes/eh-goto-pro.php (modified) (5 diffs)
-
includes/log.php (modified) (3 diffs)
-
payment-gateway-stripe-and-woocommerce-integration.php (modified) (8 diffs)
-
readme.txt (modified) (8 diffs)
-
vendor/stripe/stripe-php/.gitignore (deleted)
-
vendor/stripe/stripe-php/composer.json (deleted)
Legend:
- Unmodified
- Added
- Removed
-
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/admin/class-stripe-admin-handler.php
r3351963 r3433172 30 30 31 31 add_action('in_plugin_update_message-payment-gateway-stripe-and-woocommerce-integration/payment-gateway-stripe-and-woocommerce-integration.php', array($this, 'wt_stripe_upgrade_notice'), 10, 2); 32 33 /* * Themehigh added */ 34 add_action('init', array($this, 'redirect_to_stripe_settings')); 32 35 33 36 }); … … 64 67 65 68 add_menu_page( 66 __( ' WebToffeeStripe','payment-gateway-stripe-and-woocommerce-integration' ),67 __( ' WebToffeeStripe','payment-gateway-stripe-and-woocommerce-integration' ),69 __( 'ThemeHigh Stripe','payment-gateway-stripe-and-woocommerce-integration' ), 70 __( 'ThemeHigh Stripe','payment-gateway-stripe-and-woocommerce-integration' ), 68 71 'manage_options', 69 72 'wt_stripe_menu', … … 137 140 138 141 /* translators: %1$s: Opening paragraph and h2 tags, %2$s: Closing h2 tag, %3$s: Opening paragraph tag, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Link opening, %7$s: Link closing, %8$s: Button opening, %9$s: Button closing */ 139 $message = sprintf(esc_html__('%1$sUrgent: Switch to OAuth for Secure Stripe Integration%2$sWe are enhancing security and requires you to switch from using API keys to OAuth 2.0 for connecting with Stripe account. OAuth provides better control and limits access to only the necessary data, protecting your business from unauthorized access. %3$sEnsure to connect your Stripe account using the new authentication method before the year ends. %4$sClick %5$s"Connect Now"%6$s to update your integration today! Need help? Check out our %7$sintegration article%8$s. Please upgrade soon to avoid service disruptions.%9$sConnect Now%10$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<p><h2>', '</h2>','<p>', '</p><p>', '<b>', '</b>', '<a href="https://www. webtoffee.com/switch-stripe-integration-oauth/" style="text-decoration: none;">', '</a>', '</p><p><a href="' . esc_url($install_link) .'" class="button button-primary">', '</a></p>');142 $message = sprintf(esc_html__('%1$sUrgent: Switch to OAuth for Secure Stripe Integration%2$sWe are enhancing security and requires you to switch from using API keys to OAuth 2.0 for connecting with Stripe account. OAuth provides better control and limits access to only the necessary data, protecting your business from unauthorized access. %3$sEnsure to connect your Stripe account using the new authentication method before the year ends. %4$sClick %5$s"Connect Now"%6$s to update your integration today! Need help? Check out our %7$sintegration article%8$s. Please upgrade soon to avoid service disruptions.%9$sConnect Now%10$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<p><h2>', '</h2>','<p>', '</p><p>', '<b>', '</b>', '<a href="https://www.themehigh.com/docs/upgrade-your-stripe-integration-to-oauth-2-0-for-enhanced-security-2/" style="text-decoration: none;">', '</a>', '</p><p><a href="' . esc_url($install_link) .'" class="button button-primary">', '</a></p>'); 140 143 141 144 /* translators: %1$s: Opening paragraph and h2 tags, %2$s: Closing h2 tag, %3$s: Bold tag opening, %4$s: Bold tag closing, %5$s: Link opening, %6$s: Link closing, %7$s: Button opening, %8$s: Button closing */ … … 203 206 $stripe_params['disconnect_secondary_btn_title'] = __("Cancel", "payment-gateway-stripe-and-woocommerce-integration"); 204 207 $stripe_params['disconnect_title'] = __("Are you sure?", "payment-gateway-stripe-and-woocommerce-integration"); 205 $stripe_params['disconnect_text'] = __("Disconnecting your Stripe account from WebToffee stops payments. To fully remove the WebToffeeapp, head to 'Installed apps' in your Stripe dashboard.", "payment-gateway-stripe-and-woocommerce-integration");208 $stripe_params['disconnect_text'] = __("Disconnecting your Stripe account from ThemeHigh stops payments. To fully remove the ThemeHigh app, head to 'Installed apps' in your Stripe dashboard.", "payment-gateway-stripe-and-woocommerce-integration"); 206 209 wp_localize_script('eh_stripe_oauth', 'eh_stripe_oauth_val', $stripe_params); 207 210 … … 223 226 $webtoffee_logo=' <img src="'.EH_STRIPE_MAIN_URL_PATH.'assets/img/wt_logo.png" style="" /> '; 224 227 225 ?><div class="wfte_branding"> 228 ?> 229 <?php /* 230 <div class="wfte_branding"> 226 231 <div class="wfte_branding_label"><?php esc_html_e('Developed by', 'payment-gateway-stripe-and-woocommerce-integration'); echo wp_kses_post($webtoffee_logo);?> 227 232 </div> 228 233 <!-- <div style="width: 100%; padding: 5px;"> 229 <?php echo wp_kses_post($webtoffee_logo); ?>234 <?php //echo wp_kses_post($webtoffee_logo); ?> 230 235 </div> --> 231 </div> 236 </div> */ ?> 232 237 233 238 <?php … … 285 290 else{ 286 291 /* translators: %1$s: Opening paragraph and h2 tags, %2$s: Closing h2 tag, %3$s: Opening paragraph tag, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Link opening, %7$s: Link closing, %8$s: Button opening, %9$s: Button closing */ 287 $message = sprintf(esc_html__('%1$sUrgent: Switch to OAuth for Secure Stripe Integration%2$sWe are enhancing security and requires you to switch from using API keys to OAuth 2.0 for connecting with Stripe account. OAuth provides better control and limits access to only the necessary data, protecting your business from unauthorized access. %3$sEnsure to connect your Stripe account using the new authentication method before the year ends.%4$sClick %5$s"Connect Now"%6$s to update your integration today! Need help? Check out our %7$sintegration article%8$s. Please upgrade soon to avoid service disruptions.%9$sConnect Now%10$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<p><h2>', '</h2>', '<p>', '</p><p>', '<b>', '</b>', '<a href="https://www. webtoffee.com/switch-stripe-integration-oauth/" style="text-decoration: none;">', '</a>', '</p><p><a href="' . esc_url($install_link) .'" class="button button-primary">', '</a></p>');292 $message = sprintf(esc_html__('%1$sUrgent: Switch to OAuth for Secure Stripe Integration%2$sWe are enhancing security and requires you to switch from using API keys to OAuth 2.0 for connecting with Stripe account. OAuth provides better control and limits access to only the necessary data, protecting your business from unauthorized access. %3$sEnsure to connect your Stripe account using the new authentication method before the year ends.%4$sClick %5$s"Connect Now"%6$s to update your integration today! Need help? Check out our %7$sintegration article%8$s. Please upgrade soon to avoid service disruptions.%9$sConnect Now%10$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<p><h2>', '</h2>', '<p>', '</p><p>', '<b>', '</b>', '<a href="https://www.themehigh.com/docs/upgrade-your-stripe-integration-to-oauth-2-0-for-enhanced-security-2/" style="text-decoration: none;">', '</a>', '</p><p><a href="' . esc_url($install_link) .'" class="button button-primary">', '</a></p>'); 288 293 echo wp_kses_post("<div class='wtst-notice wtst-notice-error ' ><div style='padding:10px'>$message</div></div>"); 289 294 } … … 346 351 } 347 352 353 //themehigh added 354 jQuery(document).ready(function ($) { 355 $('#th_test_mode_type').on('click', function (e) { 356 e.preventDefault(); 357 $('#woocommerce_eh_stripe_test_mode_type_hidden').val('sandbox'); 358 $('form').submit(); // Automatically saves and reloads 359 }); 360 361 $('#th_sandbox_mode_type').on('click', function (e) { 362 e.preventDefault(); 363 $('#woocommerce_eh_stripe_test_mode_type_hidden').val('test'); 364 $('form').submit(); // Automatically saves and reloads 365 }); 366 }); 348 367 349 368 "); … … 665 684 <h3><?php esc_html_e('Documentation','payment-gateway-stripe-and-woocommerce-integration'); ?></h3> 666 685 <p><?php esc_html_e('Refer to our documentation to set up and get started.','payment-gateway-stripe-and-woocommerce-integration'); ?></p> 667 <a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/" class="button button-primary">686 <a target="_blank" href="https://www.themehigh.com/docs/stripe-payment-plugin-for-woocommerce-free/" class="button button-primary"> 668 687 <?php esc_html_e('Documentation','payment-gateway-stripe-and-woocommerce-integration'); ?> 669 688 </a> … … 673 692 <h3><?php esc_html_e('Support','payment-gateway-stripe-and-woocommerce-integration'); ?></h3> 674 693 <p><?php esc_html_e('We would love to help you on any queries or issues.','payment-gateway-stripe-and-woocommerce-integration'); ?></p> 675 <a target="_blank" href="https://w ordpress.org/support/plugin/payment-gateway-stripe-and-woocommerce-integration/" class="button button-primary">694 <a target="_blank" href="https://www.themehigh.com/docs/support/" class="button button-primary"> 676 695 <?php esc_html_e('Contact us','payment-gateway-stripe-and-woocommerce-integration'); ?> 677 696 </a> … … 1313 1332 $mode = isset($settings['eh_stripe_mode']) ? $settings['eh_stripe_mode'] : 'live'; 1314 1333 } 1315 1316 $option = ('test' === $mode) ? 'wt_stripe_oauth_connected_test' : 'wt_stripe_oauth_connected_live'; 1317 1334 //$option = ('test' === $mode) ? 'wt_stripe_oauth_connected_test' : 'wt_stripe_oauth_connected_live'; 1335 if ( 'test' === $mode ) { 1336 1337 $test_mode_type = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 1338 $option = ( 'sandbox' === $test_mode_type ) 1339 ? 'wt_stripe_oauth_connected_sandbox' 1340 : 'wt_stripe_oauth_connected_test'; 1341 } else { 1342 $option = 'wt_stripe_oauth_connected_live'; 1343 } 1344 1318 1345 if("yes" === EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => $option))){ 1319 1346 return true; … … 1324 1351 } 1325 1352 1326 static function wt_get_install_link($mode )1353 static function wt_get_install_link($mode, $test_mode_type = false) 1327 1354 { 1355 if ( is_admin() ) { 1356 if ( isset( $_REQUEST['oauth_error'] ) || isset( $_REQUEST['oauth_status'] ) ) { 1357 1358 unset( 1359 $_GET['oauth_error'], 1360 $_GET['oauth_status'], 1361 $_REQUEST['oauth_error'], 1362 $_REQUEST['oauth_status'] 1363 ); 1364 } 1365 } 1328 1366 //Stripe oAuth customer site URL 1329 $site_url = add_query_arg( array( 'wc-api'=> 'wt_stripe_oauth_update', 'mode' => $mode, 'name' => EH_STRIPE_PLUGIN_NAME), trailingslashit( get_home_url() )); 1330 //sandbox 1331 $client_id_test = 'ca_Pl5sdRX9ZIbMhFni2PDjsnkMEERxD3Ye'; 1332 1333 //live 1334 $client_id_live = 'ca_Pl5sCXjmB1vQPLI6ewCrUibnq1DojGbA'; 1335 1367 $site_url = add_query_arg( array( 1368 'wc-api'=> 'wt_stripe_oauth_update', 1369 'mode' => $mode, 1370 'test_mode_type' => $test_mode_type, 1371 'name' => EH_STRIPE_PLUGIN_NAME), 1372 trailingslashit( home_url( '/', 'https' ) ) 1373 ); 1374 1336 1375 $user_id = get_current_user_id(); 1337 1338 1376 if ( $user_id ) { 1377 delete_user_meta( $user_id, 'wtst_random_key' ); 1339 1378 // Generate a random secure key (32 characters) 1340 1379 $random_key = wp_generate_password(32, true, true); … … 1348 1387 'key' => $random_key, 1349 1388 ); 1350 1351 1389 1352 1390 } 1353 1391 1354 1355 1392 $state = base64_encode(wp_json_encode(array( 1356 1393 'site' => $site_url, … … 1358 1395 ))); 1359 1396 1397 $test_mode_type = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 1398 1399 //Stripe oAuth URL 1400 //themehigh ids - need to change after publish the app 1401 //test mode - https://marketplace.stripe.com/oauth/v2/authorize?client_id=ca_SrijWXrA8Rsh8T1Ol5Ebrist8calvSni&redirect_uri=https://verify-stripe.themehigh.com/wp-json/wt-stripe/v1/oauth 1402 //sandbox mode - https://marketplace.stripe.com/oauth/v2/authorize?client_id=ca_Srijfd5TDVdeLI8pWEMvcHp0NYNxqlxk&redirect_uri=https://verify-stripe.themehigh.com/wp-json/wt-stripe/v1/oauth 1403 //live mode - https://marketplace.stripe.com/oauth/v2/authorize?client_id=ca_SrijCzqvjxjpzH7hnfQKzcMSEEJ4YaUJ&redirect_uri=https://verify-stripe.themehigh.com/wp-json/wt-stripe/v1/oauth 1404 1405 //test 1406 $client_id_test = 'ca_SrijWXrA8Rsh8T1Ol5Ebrist8calvSni'; 1407 //sandbox 1408 $client_id_sandbox = 'ca_Srijfd5TDVdeLI8pWEMvcHp0NYNxqlxk'; 1409 //live 1410 $client_id_live = 'ca_SrijCzqvjxjpzH7hnfQKzcMSEEJ4YaUJ'; 1411 1360 1412 1361 1413 if('test' === $mode){ 1362 return add_query_arg( array('client_id' => $client_id_test, "redirect_uri" => EH_STRIPE_OAUTH_WT_URL ."oauth", "state" => $state, 'scope' => 'read_write' ), "https://marketplace.stripe.com/oauth/v2/authorize" ); 1363 1414 if($test_mode_type && 'sandbox' === $test_mode_type){ 1415 1416 return add_query_arg( array( 1417 'client_id' => $client_id_sandbox, 1418 "redirect_uri" => EH_STRIPE_OAUTH_TH_URL ."oauth", 1419 "state" => $state, 1420 'scope' => 'read_write' ), 1421 "https://marketplace.stripe.com/oauth/v2/authorize" 1422 ); 1423 }else{ 1424 return add_query_arg( array( 1425 'client_id' => $client_id_test, 1426 "redirect_uri" => EH_STRIPE_OAUTH_TH_URL ."oauth", 1427 "state" => $state, 1428 'scope' => 'read_write' ), 1429 "https://marketplace.stripe.com/oauth/v2/authorize" 1430 ); 1431 } 1364 1432 } 1365 1433 else{ 1366 return add_query_arg( array('client_id' => $client_id_live, "redirect_uri" => EH_STRIPE_OAUTH_WT_URL ."oauth", "state" => $state, 'scope' => 'read_write' ), "https://marketplace.stripe.com/oauth/v2/authorize" ); 1367 1434 return add_query_arg( array( 1435 'client_id' => $client_id_live, 1436 "redirect_uri" => EH_STRIPE_OAUTH_TH_URL ."oauth", 1437 "state" => $state, 1438 'scope' => 'read_write' ), 1439 "https://marketplace.stripe.com/oauth/v2/authorize" 1440 ); 1368 1441 } 1369 1442 } … … 1507 1580 </script> 1508 1581 <?php 1509 } 1582 } 1583 1584 /** 1585 * @since 5.0.7 1586 * Function to redirect to the settings page after plugin activation 1587 * Themehigh added 1588 */ 1589 public function redirect_to_stripe_settings(){ 1590 1591 if ( ! is_admin() && defined( 'DOING_AJAX' ) ) { 1592 return; 1593 } 1594 if(get_option('th_stripe_since',false)){ 1595 return; 1596 } 1597 update_option('th_stripe_since', time(), 'no'); 1598 wp_safe_redirect( esc_url_raw( admin_url( 'admin.php?page=wt_stripe_menu' ) ) ); 1599 exit(); 1600 1601 } 1510 1602 1511 1603 } -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-eh-security-helper.php
r3351963 r3433172 6 6 7 7 /** 8 * WebtoffeeSecurity Library8 * ThemeHigh Security Library 9 9 * 10 10 * Includes Data sanitization, Access checking 11 * @author WebToffee <info@webtoffee.com>11 * @author ThemeHigh <info@themehigh.com> 12 12 */ 13 13 -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-eh-stripe-token-handler.php
r3351963 r3433172 35 35 'WordPress Stripe Payment Gateway for WooCommerce', 36 36 EH_STRIPE_VERSION, 37 'https://www. webtoffee.com/product/woocommerce-stripe-payment-gateway/',37 'https://www.themehigh.com/product/woocommerce-stripe-payment-gateway/', 38 38 'pp_partner_KHip9dhhenLx0S' 39 39 ); … … 49 49 private static function get_stripe_api_key(){ 50 50 51 $stripe_settings = get_option( 'woocommerce_eh_stripe_pay_settings' );51 $stripe_settings = get_option( 'woocommerce_eh_stripe_pay_settings'); 52 52 if(!$stripe_settings){ 53 53 return false; 54 54 } 55 55 $mode = isset($stripe_settings['eh_stripe_mode']) ? $stripe_settings['eh_stripe_mode'] : 'live'; 56 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 56 57 if(!empty($mode)){ 57 58 if(Eh_Stripe_Admin_Handler::wtst_oauth_compatible($mode)){ 58 59 if(!self::wtst_get_oauth_expired($mode)){ 59 $wt_stripe_access_token = $mode === 'test' ? 'wt_stripe_access_token_test' : 'wt_stripe_access_token_live'; 60 //$wt_stripe_access_token = $mode === 'test' ? 'wt_stripe_access_token_test' : 'wt_stripe_access_token_live'; 61 if ( 'test' === $mode ) { 62 $wt_stripe_access_token = ( 'sandbox' === $test_mode ) 63 ? 'wt_stripe_access_token_sandbox' 64 : 'wt_stripe_access_token_test'; 65 } else { 66 $wt_stripe_access_token = 'wt_stripe_access_token_live'; 67 } 60 68 return base64_decode(self::wtst_get_site_option('get', array('name' => $wt_stripe_access_token))); 61 69 } else { 62 70 return self::wtst_refresh_token(); 63 }71 } 64 72 } 65 73 … … 89 97 * 90 98 */ 91 private static function wtst_refresh_token($force = false)99 /* private static function wtst_refresh_token($force = false) 92 100 { 93 101 $lock_folder_path = self::get_temp_dir(); … … 104 112 } 105 113 106 $stripe_settings = get_option("woocommerce_eh_stripe_pay_settings" );114 $stripe_settings = get_option("woocommerce_eh_stripe_pay_settings", array()); 107 115 $stripe_settings["eh_stripe_mode"] = (isset($stripe_settings["eh_stripe_mode"]) && !empty($stripe_settings["eh_stripe_mode"])) ? $stripe_settings["eh_stripe_mode"] : 'live'; 116 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 108 117 109 118 if(!self::wtst_get_oauth_expired($stripe_settings["eh_stripe_mode"]) && !$force){ 110 119 $wt_stripe_access_token = $stripe_settings["eh_stripe_mode"] === 'test' ? 'wt_stripe_access_token_test' : 'wt_stripe_access_token_live'; 120 $wt_stripe_access_token = ($stripe_settings["eh_stripe_mode"] === 'test' && $test_mode === 'sandbox') ? 'wt_stripe_access_token_sandbox' : $wt_stripe_access_token; 111 121 return base64_decode(self::wtst_get_site_option('get', array('name' => $wt_stripe_access_token))); 112 122 } 123 124 $app_author = get_option('eh_stripe_connected_app_author'); 113 125 114 126 // Ensure the file handle is a valid resource before attempting to lock 115 127 if (is_resource($lock_handle) && flock($lock_handle, LOCK_EX | LOCK_NB)) { 116 128 try { 129 $access_token_url = EH_STRIPE_OAUTH_TH_URL . 'get-access-token'; 130 if(!$app_author || $app_author !== 'themehigh'){ 131 $access_token_url = EH_STRIPE_OAUTH_WT_URL . 'get-access-token'; 132 } 117 133 118 $access_token_url = EH_STRIPE_OAUTH_WT_URL . 'get-access-token';119 120 134 $instance = self::get_instance(); 121 135 122 136 if('test' === $stripe_settings["eh_stripe_mode"]){ 123 137 //Clear cache for the tokens to get the newly updated values 124 $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_test', 'wt_stripe_account_id_test')); 125 126 $refresh_token = base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_test'))); 127 $account_id = self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_test')); 138 if($test_mode === 'sandbox'){ 139 $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_sandbox', 'wt_stripe_account_id_sandbox')); 140 141 $refresh_token = base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_sandbox'))); 142 $account_id = self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_sandbox')); 143 144 }else{ 145 $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_test', 'wt_stripe_account_id_test')); 146 147 $refresh_token = base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_test'))); 148 $account_id = self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_test')); 149 } 128 150 } 129 151 else{ … … 145 167 'refresh_token' => sanitize_text_field($refresh_token), 146 168 'mode' => sanitize_text_field($stripe_settings["eh_stripe_mode"]), 169 'test_mode_type' => sanitize_text_field($test_mode), 147 170 'account_id' => sanitize_text_field($account_id), 148 171 … … 212 235 213 236 $mode_prefix = ('test' === $stripe_settings["eh_stripe_mode"]) ? 'test' : 'live'; 237 $mode_prefix = ('test' === $stripe_settings ["eh_stripe_mode"] && $test_mode === 'sandbox'] ? 'sandbox' : $mode_prefix; 214 238 $option_names = [ 215 239 'wtst_oauth_expriy_' . $mode_prefix => time(), … … 258 282 if(!is_admin()){ 259 283 if (function_exists('wc_add_notice')) { 260 / * translators: Error message asking user to try again later */284 // translators: Error message asking user to try again later 261 285 wc_add_notice(__('Please try again after some time', 'payment-gateway-stripe-and-woocommerce-integration'), 'error'); 262 286 } … … 286 310 if(!is_admin()){ 287 311 if (function_exists('wc_add_notice')) { 288 / * translators: Error message asking user to try again later */312 // translators: Error message asking user to try again later 289 313 wc_add_notice(__('Please try again after some time', 'payment-gateway-stripe-and-woocommerce-integration'), 'error'); 290 314 } … … 293 317 } 294 318 } 295 } 319 }*/ 320 321 /************* Refresh token function -START ***********/ 322 323 private static function wtst_refresh_token( $force = false ) { 324 325 $lock_file_path = self::get_temp_dir() . '/stripe_token_refresh.lock'; 326 $max_retries = 3; 327 $retry_delay = 2; 328 329 // Resolve settings safely 330 $stripe_settings = get_option( 'woocommerce_eh_stripe_pay_settings', array() ); 331 $mode = ! empty( $stripe_settings['eh_stripe_mode'] ) ? $stripe_settings['eh_stripe_mode'] : 'live'; 332 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 333 334 // Fast-path: token still valid and no force refresh 335 if ( ! self::wtst_get_oauth_expired( $mode ) && ! $force ) { 336 return self::get_current_access_token($mode, $test_mode); 337 } 338 339 for ( $attempt = 1; $attempt <= $max_retries; $attempt++ ) { 340 // Open lock file 341 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen -- Needed for file locking with flock() 342 $lock_handle = fopen( $lock_file_path, 'c+' ); 343 if ( ! $lock_handle ) { 344 EH_Stripe_Log::log_update( 'oauth', 'Unable to open lock file', 'Refresh token error' ); 345 return false; 346 } 347 348 // Try to acquire lock 349 if ( ! flock( $lock_handle, LOCK_EX | LOCK_NB ) ) { 350 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Closing lock file 351 fclose( $lock_handle ); 352 353 if ( $attempt < $max_retries ) { 354 sleep( $retry_delay ); 355 continue; 356 } 357 358 EH_Stripe_Log::log_update( 'oauth', 'Failed to acquire refresh lock after retries', 'Refresh token error'); 359 self::handle_refresh_error(); 360 return false; 361 } 362 // Lock acquired - proceed with refresh 363 try { 364 // Double-check expiry after acquiring lock (another process may have refreshed) 365 if ( ! self::wtst_get_oauth_expired( $mode ) && ! $force ) { 366 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_flock -- Required for atomic locking 367 flock( $lock_handle, LOCK_UN ); 368 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Closing lock file 369 fclose( $lock_handle ); 370 return self::get_current_access_token($mode, $test_mode); 371 } 372 return self::execute_token_refresh($mode, $test_mode); 373 374 } catch ( Exception $e ) { 375 376 EH_Stripe_Log::log_update( 'oauth', $e->getMessage(), 'Refresh token error' ); 377 self::handle_refresh_error(); 378 379 } finally { 380 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_flock -- Required for atomic locking 381 flock( $lock_handle, LOCK_UN ); 382 // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Closing lock file 383 fclose( $lock_handle ); 384 } 385 } 386 387 return false; 388 } 389 390 /** 391 * Get current valid access token 392 */ 393 private static function get_current_access_token($mode, $test_mode){ 394 $token_option = ('test' === $mode) 395 ? ('sandbox' === $test_mode ? 'wt_stripe_access_token_sandbox' : 'wt_stripe_access_token_test') 396 : 'wt_stripe_access_token_live'; 397 398 $token = self::wtst_get_site_option('get', array('name' => $token_option)); 399 return $token ? base64_decode($token) : false; 400 } 401 /** 402 * Execute the actual token refresh logic 403 */ 404 private static function execute_token_refresh($mode, $test_mode) { 405 406 $instance = self::get_instance(); 407 $app_author = get_option( 'eh_stripe_connected_app_author' ); 408 409 $access_token_url = ( $app_author === 'themehigh' ) 410 ? EH_STRIPE_OAUTH_TH_URL . 'get-access-token' 411 : EH_STRIPE_OAUTH_WT_URL . 'get-access-token'; 412 413 // Resolve refresh token + account ID 414 if ( 'test' === $mode ) { 415 416 if ( 'sandbox' === $test_mode ) { 417 $instance->wtst_clear_cache_for_options( 418 array( 'wt_stripe_refresh_token_sandbox', 'wt_stripe_account_id_sandbox' ) 419 ); 420 $refresh_token = base64_decode( 421 self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_refresh_token_sandbox' ) ) 422 ); 423 $account_id = self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_account_id_sandbox' ) ); 424 $mode_prefix = 'sandbox'; 425 } else { 426 $instance->wtst_clear_cache_for_options( 427 array( 'wt_stripe_refresh_token_test', 'wt_stripe_account_id_test' ) 428 ); 429 $refresh_token = base64_decode( 430 self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_refresh_token_test' ) ) 431 ); 432 $account_id = self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_account_id_test' ) ); 433 $mode_prefix = 'test'; 434 } 435 } else { 436 $instance->wtst_clear_cache_for_options( 437 array( 'wt_stripe_refresh_token_live', 'wt_stripe_account_id_live' ) 438 ); 439 $refresh_token = base64_decode( 440 self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_refresh_token_live' ) ) 441 ); 442 $account_id = self::wtst_get_site_option( 'get', array( 'name' => 'wt_stripe_account_id_live' ) ); 443 $mode_prefix = 'live'; 444 } 445 446 if ( ! $refresh_token ) { 447 require_once EH_STRIPE_MAIN_PATH . 'includes/class-stripe-oauth.php'; 448 EH_Stripe_Oauth::wtst_oauth_disconnect( true ); 449 throw new Exception( 'Refresh token missing' ); 450 } 451 // Make API request 452 $response = self::make_refresh_request($access_token_url, $refresh_token, $mode, $test_mode, $account_id); 453 // Process and store response 454 return self::process_refresh_response($response, $mode_prefix); 455 456 } 457 458 private static function make_refresh_request($url, $refresh_token, $mode, $test_mode, $account_id){ 459 460 $request_body = wp_json_encode( 461 array( 462 'refresh_token' => sanitize_text_field( $refresh_token ), 463 'mode' => $mode, 464 'test_mode_type' => $test_mode, 465 'account_id' => sanitize_text_field( $account_id ), 466 ) 467 ); 468 469 $response = wp_safe_remote_post( 470 $url, 471 array( 472 'body' => $request_body, 473 'headers' => array( 474 'Content-Type' => 'application/json', 475 'User-Agent' => self::wt_get_api_user_agent(), 476 ), 477 'timeout' => apply_filters("wtst_refresh_token_timeout", 60), // Optional: Set a timeout for the request. 478 'connect_timeout' => apply_filters("wtst_refresh_token_connect_timeout", 25), // Connection timeout 479 ) 480 ); 481 482 EH_Stripe_Log::log_update('oauth', $response,'Refresh token API response'); 483 484 if ( is_wp_error( $response ) ) { 485 // There was an error in the request. 486 throw new Exception( 487 'WP error - ' . esc_html( $response->get_error_message() ) 488 ); 489 } 490 return $response; 491 } 492 493 /** 494 * Process the refresh token response 495 */ 496 private static function process_refresh_response($response, $mode_prefix){ 497 498 $body = wp_remote_retrieve_body( $response ); 499 if ( empty( $body ) ) { 500 throw new Exception( 'Empty OAuth response body' ); 501 } 502 503 $response_body = json_decode( $body, true ); 504 if ( ! is_array( $response_body ) ) { 505 throw new Exception( 'Invalid OAuth JSON response' ); 506 } 507 508 $should_disconnect = false; 509 510 if ( isset( $response_body['error'] ) ) { 511 512 if ( $response_body['error'] === 'invalid_grant' ) { 513 $should_disconnect = true; 514 } 515 516 if ( 517 isset( $response_body['error_description'] ) && 518 stripos( $response_body['error_description'], 'invalid_grant' ) !== false 519 ) { 520 $should_disconnect = true; 521 } 522 523 if ( 524 isset( $response_body['error_description'] ) && 525 stripos( $response_body['error_description'], 'refresh_token' ) !== false && 526 stripos( $response_body['error_description'], 'empty' ) !== false 527 ) { 528 $should_disconnect = true; 529 } 530 } 531 532 if ( $should_disconnect ) { 533 require_once EH_STRIPE_MAIN_PATH . 'includes/class-stripe-oauth.php'; 534 EH_Stripe_Oauth::wtst_oauth_disconnect( true ); 535 throw new Exception( 'OAuth refresh token revoked' ); 536 } 537 538 // reuse parsed response 539 $decoded = $response_body; 540 EH_Stripe_Log::log_update('oauth', $decoded,'Refresh token API response parsed'); 541 542 if ( isset( $decoded['error'] ) ) { 543 544 throw new Exception( 545 'Error: ' . 546 esc_html( $decoded['error'] ?? '' ) . ' ' . 547 esc_html( $decoded['error_description'] ?? '' ) 548 ); 549 } 550 if ( empty( $decoded['access_token'] ) || empty( $decoded['refresh_token'] ) ) { 551 throw new Exception( 'Invalid refresh response' ); 552 } 553 554 $option_updates = array( 555 'wtst_oauth_expriy_' . $mode_prefix => time(), 556 'wt_stripe_access_token_' . $mode_prefix => base64_encode( sanitize_text_field( $decoded['access_token'] ) ), 557 'wt_stripe_refresh_token_' . $mode_prefix => base64_encode( sanitize_text_field( $decoded['refresh_token'] ) ), 558 'wt_stripe_' . $mode_prefix . '_publishable_key' 559 => sanitize_text_field( $decoded['stripe_publishable_key'] ?? '' ), 560 ); 561 562 foreach ( $option_updates as $name => $value ) { 563 self::wtst_get_site_option( 'update', array( 'name' => $name, 'value' => $value ) ); 564 } 565 566 // Schedule recurring refresh 567 if (function_exists('as_unschedule_all_actions')) { 568 as_unschedule_all_actions('eh_stripe_refresh_oauth_token', null); 569 } 570 if (!as_next_scheduled_action('eh_stripe_refresh_oauth_token')) { 571 as_schedule_recurring_action( 572 time() + 50 * MINUTE_IN_SECONDS, // ✅ first run AFTER 50 minutes 573 50 * MINUTE_IN_SECONDS, 574 'eh_stripe_refresh_oauth_token' 575 ); 576 } 577 578 return sanitize_text_field( $decoded['access_token'] ); 579 580 } 581 582 /** 583 * Handle refresh errors consistently 584 */ 585 private static function handle_refresh_error(){ 586 587 if (!is_admin() && ! wp_doing_cron() && function_exists('wc_add_notice')) { 588 wc_add_notice( 589 __('Please try again after some time', 'payment-gateway-stripe-and-woocommerce-integration'), 590 'error' 591 ); 592 } 593 } 594 595 /************* Refresh token function - End ***********/ 296 596 297 597 /** … … 301 601 * 302 602 */ 303 public static function wtst_get_stripe_tokens($mode) { 304 if(!empty($mode)) { 305 $instance = self::get_instance(); 306 if ('test' === $mode) { 307 //Clear cache for the tokens to get the newly updated values 308 $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_test', 'wt_stripe_account_id_test', 'wt_stripe_access_token_test', 'wt_stripe_test_publishable_key')); 309 310 return array( 311 "wt_stripe_account_id" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_test')), 312 "wt_stripe_access_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_test'))), 313 "wt_stripe_refresh_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_test'))), 314 "wt_stripe_publishable_key" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_test_publishable_key')), 315 ); 316 } else { 317 //Clear cache for the tokens to get the newly updated values 318 $instance->wtst_clear_cache_for_options(array('wt_stripe_account_id_live', 'wt_stripe_access_token_live', 'wt_stripe_refresh_token_live', 'wt_stripe_live_publishable_key')); 319 320 return array( 321 "wt_stripe_account_id" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_live')), 322 "wt_stripe_access_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_live'))), 323 "wt_stripe_refresh_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_live'))), 324 "wt_stripe_publishable_key" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_live_publishable_key')), 325 ); 326 } 327 } 328 } 603 // public static function wtst_get_stripe_tokens($mode, $test_mode = false) { 604 // if(!empty($mode)) { 605 // $instance = self::get_instance(); 606 607 // if ('test' === $mode) { 608 609 // $test_mode = !$test_mode ? EH_Stripe_Token_Handler::get_stripe_test_mode_type() : $test_mode; 610 // if($test_mode === 'sandbox'){ 611 // //Clear cache for the tokens to get the newly updated values 612 // $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_sandbox', 'wt_stripe_account_id_sandbox', 'wt_stripe_access_token_sandbox', 'wt_stripe_sandbox_publishable_key')); 613 614 // return array( 615 // "wt_stripe_account_id" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_sandbox')), 616 // "wt_stripe_access_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_sandbox'))), 617 // "wt_stripe_refresh_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_sandbox'))), 618 // "wt_stripe_publishable_key" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_sandbox_publishable_key')), 619 // ); 620 // } 621 // //Clear cache for the tokens to get the newly updated values 622 // $instance->wtst_clear_cache_for_options(array('wt_stripe_refresh_token_test', 'wt_stripe_account_id_test', 'wt_stripe_access_token_test', 'wt_stripe_test_publishable_key')); 623 624 // return array( 625 // "wt_stripe_account_id" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_test')), 626 // "wt_stripe_access_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_test'))), 627 // "wt_stripe_refresh_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_test'))), 628 // "wt_stripe_publishable_key" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_test_publishable_key')), 629 // ); 630 // } else { 631 // //Clear cache for the tokens to get the newly updated values 632 // $instance->wtst_clear_cache_for_options(array('wt_stripe_account_id_live', 'wt_stripe_access_token_live', 'wt_stripe_refresh_token_live', 'wt_stripe_live_publishable_key')); 633 634 // return array( 635 // "wt_stripe_account_id" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_live')), 636 // "wt_stripe_access_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_live'))), 637 // "wt_stripe_refresh_token" => base64_decode(self::wtst_get_site_option('get', array('name' => 'wt_stripe_refresh_token_live'))), 638 // "wt_stripe_publishable_key" => self::wtst_get_site_option('get', array('name' => 'wt_stripe_live_publishable_key')), 639 // ); 640 // } 641 // } 642 // } 643 644 public static function wtst_get_stripe_tokens( $mode, $test_mode = null ) { 645 646 if ( empty( $mode ) ) { 647 return false; 648 } 649 650 $instance = self::get_instance(); 651 652 if ( 'test' === $mode ) { 653 654 $test_mode = $test_mode ?: EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 655 $prefix = ( 'sandbox' === $test_mode ) ? 'sandbox' : 'test'; 656 657 } else { 658 $prefix = 'live'; 659 } 660 661 // Clear cache (if required) 662 $instance->wtst_clear_cache_for_options( array( 663 "wt_stripe_account_id_{$prefix}", 664 "wt_stripe_access_token_{$prefix}", 665 "wt_stripe_refresh_token_{$prefix}", 666 "wt_stripe_{$prefix}_publishable_key", 667 ) ); 668 669 $account_id = self::wtst_get_site_option( 'get', array( 'name' => "wt_stripe_account_id_{$prefix}" ) ); 670 $access_token = self::wtst_get_site_option( 'get', array( 'name' => "wt_stripe_access_token_{$prefix}" ) ); 671 $refresh_token = self::wtst_get_site_option( 'get', array( 'name' => "wt_stripe_refresh_token_{$prefix}" ) ); 672 $publishable_key = self::wtst_get_site_option( 'get', array( 'name' => "wt_stripe_{$prefix}_publishable_key" ) ); 673 674 return array( 675 'wt_stripe_account_id' => $account_id ?: '', 676 'wt_stripe_access_token' => $access_token ? base64_decode( $access_token ) : '', 677 'wt_stripe_refresh_token' => $refresh_token ? base64_decode( $refresh_token ) : '', 678 'wt_stripe_publishable_key' => $publishable_key ?: '', 679 ); 680 } 329 681 330 682 … … 358 710 // Clear specific option cache 359 711 wp_cache_delete($option_name, 'options'); 712 // Multisite (network) options 713 wp_cache_delete($option_name, 'site-options'); 360 714 361 715 } … … 466 820 */ 467 821 public static function wtst_get_oauth_expired($mode){ 468 $wtst_oauth_expriy_name = $mode === 'test' ? 'wtst_oauth_expriy_test' : 'wtst_oauth_expriy_live'; 469 $expiry_time = self::wtst_get_site_option('get', array('name' => $wtst_oauth_expriy_name )); 822 823 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 824 if ( 'test' === $mode ) { 825 $option = ( 'sandbox' === $test_mode ) 826 ? 'wtst_oauth_expriy_sandbox' 827 : 'wtst_oauth_expriy_test'; 828 } else { 829 $option = 'wtst_oauth_expriy_live'; 830 } 831 $expiry_time = self::wtst_get_site_option('get', array('name' => $option )); 470 832 if ($expiry_time && (time() - $expiry_time) <= 3000) { // 3000 seconds = 50 minutes 471 833 return false; … … 524 886 525 887 return apply_filters('eh_stripe_api_user_agent', $user_agent); 526 } 888 } 889 890 /** Themehigh added */ 891 public static function get_stripe_test_mode_type() { 892 $mode = get_option("woocommerce_eh_stripe_test_mode_type"); 893 return ( $mode === 'sandbox' ) ? 'sandbox' : 'test'; 894 } 527 895 } -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-gateway-stripe-alipay.php
r3351963 r3433172 66 66 'type' => 'title', 67 67 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 68 'description' => sprintf( __('%1$sSupported currencies: %2$s CNY, AUD, CAD, EUR, GBP, HKD, JPY, MYR, NZD, SGD, USD %3$s.%4$sStripe accounts in the following countries can accept the payment: %5$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malaysia, Malta, Netherlands, New Zealand, Norway, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%6$s %7$s Read documentation %8$s ', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#alipay">', '</a></p>'),68 'description' => sprintf( __('%1$sSupported currencies: %2$s CNY, AUD, CAD, EUR, GBP, HKD, JPY, MYR, NZD, SGD, USD %3$s.%4$sStripe accounts in the following countries can accept the payment: %5$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malaysia, Malta, Netherlands, New Zealand, Norway, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%6$s %7$s Read documentation %8$s ', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-alipay-payment-method-for-a-woocommerce-store/">', '</a></p>'), 69 69 ), 70 70 'eh_stripe_alipay_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-afterpay.php
r3351963 r3433172 66 66 'type' => 'title', 67 67 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 68 'description' => sprintf(__('%1$sSupported currencies: %2$sUSD, CAD, GBP, AUD, NZD, EUR%3$sStripe accounts in the following countries can accept the payment: % 4$sAustralia, Canada, New Zealand, United Kingdom, United States%5$s%6$s%7$sRead documentation%8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#afterpay">', '</a></p>', ''),68 'description' => sprintf(__('%1$sSupported currencies: %2$sUSD, CAD, GBP, AUD, NZD, EUR%3$sStripe accounts in the following countries can accept the payment: %2$sAustralia, Canada, New Zealand, United Kingdom, United States%3$s</li></ul><p><a target="_blank" href="https://www.themehigh.com/docs/set-up-afterpay-or-clearpay-payment-method-for-a-woocommerce-store/">Read documentation</a></p></div>', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>'), 69 69 ), 70 70 -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-api.php
r3351963 r3433172 68 68 69 69 /* translators: %s: Documentation link text */ 70 $this->method_description = sprintf(__("Accepts Stripe payments via credit or debit card. <p><a target='_blank' href='https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#credit_debit'>%s</a></p>", 'payment-gateway-stripe-and-woocommerce-integration'), esc_html__("Read documentation", 'payment-gateway-stripe-and-woocommerce-integration'));70 $this->method_description = sprintf(__("Accepts Stripe payments via credit or debit card. <p><a target='_blank' href='https://www.themehigh.com/docs/stripe-payment-plugin-for-woocommerce-free/#credit_debit_cards'>%s</a></p>", 'payment-gateway-stripe-and-woocommerce-integration'), esc_html__("Read documentation", 'payment-gateway-stripe-and-woocommerce-integration')); 71 71 72 72 if ('test' === $this->eh_stripe_mode) { … … 122 122 */ 123 123 public function process_admin_options(){ 124 125 //save test mode types 126 if (isset($_POST['woocommerce_eh_stripe_test_mode_type_hidden'])) { 127 $mode = sanitize_text_field($_POST['woocommerce_eh_stripe_test_mode_type_hidden']); 128 if (in_array($mode, ['test', 'sandbox'], true)) { 129 update_option('woocommerce_eh_stripe_test_mode_type', $mode); 130 } 131 } 124 132 125 133 parent::process_admin_options(); … … 858 866 $card_brand = $wc_token->get_card_type(); 859 867 $payment_method = $token; 860 $customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 868 //$customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 869 $customer = EH_Stripe_Payment::validate_and_clean_customer_id($logged_in_userid); 861 870 if (!$payment_method || !$customer) { 862 871 throw new Exception(__("Invalid card. Please select another card or input a new card number", 'payment-gateway-stripe-and-woocommerce-integration')); … … 881 890 882 891 //check customer token is exist for the logged in user 883 $customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 892 //$customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 893 $customer = EH_Stripe_Payment::validate_and_clean_customer_id($logged_in_userid); 884 894 } 885 895 … … 1037 1047 $logged_in_userid = get_current_user_id(); 1038 1048 //check customer token is exist for the logged in user 1039 $customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 1049 //$customer = get_user_meta($logged_in_userid, '_stripe_customer_id', true); 1050 $customer = EH_Stripe_Payment::validate_and_clean_customer_id($logged_in_userid); 1040 1051 1041 1052 //create stripe customer … … 1587 1598 return false; 1588 1599 } 1589 } 1600 } 1601 1602 // public function save_custom_settings_for_test_mode() { 1603 1604 // if (isset($_POST['woocommerce_eh_stripe_test_mode_type_hidden'])) { 1605 // $mode = sanitize_text_field($_POST['woocommerce_eh_stripe_test_mode_type_hidden']); 1606 // if (in_array($mode, ['test', 'sandbox'], true)) { 1607 // update_option('woocommerce_eh_stripe_test_mode_type', $mode); 1608 // } 1609 // } 1610 // } 1611 1612 /** 1613 * Themehigh added 1614 * Validate Customer 1615 * @since 5.0.0 1616 * @param string $customer_id 1617 * 1618 */ 1619 1620 public static function validate_and_clean_customer_id($user_id) { 1621 $customer_id = get_user_meta($user_id, '_stripe_customer_id', true); 1622 1623 if (empty($customer_id)) { 1624 return ''; 1625 } 1626 1627 try { 1628 \Stripe\Customer::retrieve($customer_id); 1629 return $customer_id; 1630 } catch (\Stripe\Exception\InvalidRequestException $e) { 1631 // Customer doesn't exist, remove invalid ID 1632 delete_user_meta($user_id, '_stripe_customer_id'); 1633 return ''; 1634 } 1635 } 1590 1636 1591 1637 } -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-apple-pay.php
r3348088 r3433172 26 26 'title' => sprintf('<span style="font-weight: bold; font-size: 15px; color:#23282d;">'.__( 'Apple Pay','payment-gateway-stripe-and-woocommerce-integration' ).'<span>'), 27 27 'type' => 'title', 28 'description' => __('Accepts payments via Apple Pay.', 'payment-gateway-stripe-and-woocommerce-integration') .' <div class="wt_info_div"><p> '.__('To use Apple Pay, you need to register all your web domains that display the Apple Pay button with Apple and verify ownership of each domain.', 'payment-gateway-stripe-and-woocommerce-integration').' </p> <p>'.__('Steps to register:', 'payment-gateway-stripe-and-woocommerce-integration').'</p><ol><li>Register your domain with Apple.</li><ul class="wt_notice_bar_style"><li> '.__('To do this, navigate to <a href="https://dashboard.stripe.com/settings/payment_method_domains" target="_blank">Settings > Payments > Payment method domains </a> from your Stripe dashboard and add your domain. All domains, whether in production or testing, must be registered. Don’t register your domain more than once per account.', 'payment-gateway-stripe-and-woocommerce-integration').' </li></ul><li>Verify ownership of your domain with Apple Pay.</li><ul class="wt_notice_bar_style"><li>'.__('Download the <a href="https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association"> domain association file </a> and host it at /.well-known/apple-developer-merchantid-domain-association on your site. For example, if you’re registering https://example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.', 'payment-gateway-stripe-and-woocommerce-integration').'</li></ul></ol> <p> '.__('Payment methods are only available when you use a', 'payment-gateway-stripe-and-woocommerce-integration').' <a href="https://docs.stripe.com/elements/express-checkout-element#supported-browsers" target="_blank">'.__(' supported browser', 'payment-gateway-stripe-and-woocommerce-integration').'</a> and pay in a supported currency.</p> </div><p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#apple_pay"> '.__('Read documentation', 'payment-gateway-stripe-and-woocommerce-integration').' </a></p>',28 'description' => __('Accepts payments via Apple Pay.', 'payment-gateway-stripe-and-woocommerce-integration') .' <div class="wt_info_div"><p> '.__('To use Apple Pay, you need to register all your web domains that display the Apple Pay button with Apple and verify ownership of each domain.', 'payment-gateway-stripe-and-woocommerce-integration').' </p> <p>'.__('Steps to register:', 'payment-gateway-stripe-and-woocommerce-integration').'</p><ol><li>Register your domain with Apple.</li><ul class="wt_notice_bar_style"><li> '.__('To do this, navigate to <a href="https://dashboard.stripe.com/settings/payment_method_domains" target="_blank">Settings > Payments > Payment method domains </a> from your Stripe dashboard and add your domain. All domains, whether in production or testing, must be registered. Don’t register your domain more than once per account.', 'payment-gateway-stripe-and-woocommerce-integration').' </li></ul><li>Verify ownership of your domain with Apple Pay.</li><ul class="wt_notice_bar_style"><li>'.__('Download the <a href="https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association"> domain association file </a> and host it at /.well-known/apple-developer-merchantid-domain-association on your site. For example, if you’re registering https://example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.', 'payment-gateway-stripe-and-woocommerce-integration').'</li></ul></ol> <p> '.__('Payment methods are only available when you use a', 'payment-gateway-stripe-and-woocommerce-integration').' <a href="https://docs.stripe.com/elements/express-checkout-element#supported-browsers" target="_blank">'.__(' supported browser', 'payment-gateway-stripe-and-woocommerce-integration').'</a> and pay in a supported currency.</p> </div><p><a target="_blank" href="https://www.themehigh.com/docs/stripe-payment-plugin-for-woocommerce-free/#apple_pay"> '.__('Read documentation', 'payment-gateway-stripe-and-woocommerce-integration').' </a></p>', 29 29 ), 30 30 'eh_stripe_apple_pay_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-bacs.php
r3348088 r3433172 147 147 'type' => 'title', 148 148 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 149 'description' => sprintf(__('%1$sTo accept payments via Bacs Direct Debit payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),149 'description' => sprintf(__('%1$sTo accept payments via Bacs Direct Debit payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 150 150 ), 151 151 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-bancontact.php
r3351963 r3433172 69 69 'type' => 'title', 70 70 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 71 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#bancontact">', '</a></p>'),71 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-bancontact-payment-method-for-a-woocommerce-store/">', '</a></p>'), 72 72 ), 73 73 'eh_stripe_bancontact_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-becs.php
r3351963 r3433172 117 117 'type' => 'title', 118 118 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 119 'description' => sprintf(__('%1$sTo accept payments via BECS payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),119 'description' => sprintf(__('%1$sTo accept payments via BECS payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 120 120 ), 121 121 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-boleto.php
r3351963 r3433172 109 109 'type' => 'title', 110 110 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 111 'description' => sprintf(__('%1$sTo accept payments via Boleto payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),111 'description' => sprintf(__('%1$sTo accept payments via Boleto payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 112 112 ), 113 113 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-checkout.php
r3348088 r3433172 37 37 $this->description = $this->get_option( 'eh_stripe_checkout_description' ); 38 38 /* translators: %1$s: Opening paragraph tag with style, %2$s: Dashboard link opening, %3$s: Dashboard link closing, %4$s: Preview link opening, %5$s: Preview link closing, %6$s: Closing paragraph tag, %7$s: Documentation link opening, %8$s: Documentation link closing, %9$s: Closing paragraph tag */ 39 $this->method_description = sprintf( __( '%1$sStripe Checkout redirects users to a secure, Stripe-hosted payment page to accept payment. You will have to specify an account name in Stripe %2$sDashboard%3$s prior to configuring the settings. %4$sPreview%5$s%6$s%7$sRead documentation%8$s%9$s', 'payment-gateway-stripe-and-woocommerce-integration' ), '<p style="max-width: 97%;">', '<a href="https://dashboard.stripe.com/account" target="_blank">', '</a>', '<a class="thickbox" href="' . EH_STRIPE_MAIN_URL_PATH . 'assets/img/stripe_checkout_line_items.gif?TB_iframe=true&width=100&height=100" >', '</a>', '</p>','<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#stripe_checkout">', '</a>', '</p>' );39 $this->method_description = sprintf( __( '%1$sStripe Checkout redirects users to a secure, Stripe-hosted payment page to accept payment. You will have to specify an account name in Stripe %2$sDashboard%3$s prior to configuring the settings. %4$sPreview%5$s%6$s%7$sRead documentation%8$s%9$s', 'payment-gateway-stripe-and-woocommerce-integration' ), '<p style="max-width: 97%;">', '<a href="https://dashboard.stripe.com/account" target="_blank">', '</a>', '<a class="thickbox" href="' . EH_STRIPE_MAIN_URL_PATH . 'assets/img/stripe_checkout_line_items.gif?TB_iframe=true&width=100&height=100" >', '</a>', '</p>','<p><a target="_blank" href="https://www.themehigh.com/docs/stripe-payment-plugin-for-woocommerce-free//#stripe_checkout">', '</a>', '</p>' ); 40 40 41 41 $this->enabled = $this->get_option( 'enabled' ); … … 181 181 'type' => 'title', 182 182 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 183 'description' => sprintf(__('%1$sTo accept payments via delayed payment methods from Stripe hosted page, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),183 'description' => sprintf(__('%1$sTo accept payments via delayed payment methods from Stripe hosted page, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 184 184 ), 185 185 ); … … 567 567 $user = wp_get_current_user(); 568 568 $logged_in_userid = $user->ID; 569 $customer_id = get_user_meta($logged_in_userid, '_stripe_ch_customer_id', true); 569 //$customer_id = get_user_meta($logged_in_userid, '_stripe_ch_customer_id', true); 570 $customer_id = $this->validate_and_clean_stripe_ch_customer_id($logged_in_userid); 570 571 //create stripe customer 571 572 if (empty($customer_id)) { … … 893 894 894 895 } 896 897 /** 898 * Validates and cleans the Stripe Checkout customer ID. 899 *themehigh added 900 * @param int $user_id The user ID to validate. 901 * @return string The valid Stripe Checkout customer ID or an empty string if invalid. 902 */ 903 public function validate_and_clean_stripe_ch_customer_id($user_id) { 904 $customer_id = get_user_meta($user_id, '_stripe_ch_customer_id', true); 905 906 if (empty($customer_id)) { 907 return ''; 908 } 909 910 try { 911 \Stripe\Customer::retrieve($customer_id); 912 return $customer_id; 913 } catch (\Stripe\Exception\InvalidRequestException $e) { 914 // Customer doesn't exist, remove invalid ID 915 delete_user_meta($user_id, '_stripe_ch_customer_id'); 916 return ''; 917 } 918 } 895 919 } -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-eps.php
r3351963 r3433172 69 69 'type' => 'title', 70 70 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 71 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#eps">', '</a></p>'),71 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-eps-payment-method-for-a-woocommerce-store/">', '</a></p>'), 72 72 ), 73 73 'eh_stripe_eps_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-general-settings.php
r3348088 r3433172 354 354 $html = ''; 355 355 $settings = get_option("woocommerce_eh_stripe_pay_settings"); 356 $mode = isset($settings['eh_stripe_mode']) ? $settings['eh_stripe_mode'] : 'live'; 357 if('test' === $mode ){ 356 $mode = isset($settings['eh_stripe_mode']) ? $settings['eh_stripe_mode'] : 'live'; 357 $test_mode_type = get_option( 'woocommerce_eh_stripe_test_mode_type', 'test' ); 358 if('test' === $mode ){ 359 360 $token_option = ( 'sandbox' === $test_mode_type ) 361 ? 'wt_stripe_access_token_sandbox' 362 : 'wt_stripe_access_token_test'; 363 364 $account_id_option = ( 'sandbox' === $test_mode_type ) 365 ? 'wt_stripe_account_id_sandbox' 366 : 'wt_stripe_account_id_test'; 358 367 if(true === Eh_Stripe_Admin_Handler::wtst_oauth_compatible() && 359 !empty(EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_test')))) { 360 $wt_stripe_account_id = EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_test')); 361 362 363 364 $html = '<tr valign="top"> 368 !empty(EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => $token_option)))) { 369 370 $wt_stripe_account_id = EH_Stripe_Token_Handler::wtst_get_site_option( 371 'get', 372 array( 'name' => $account_id_option ) 373 ); 374 375 $html = $this->get_oauth_connection_warning_html($settings); 376 $html .= '<tr valign="top"> 365 377 <th scope="row" class="titledesc"> 366 378 <label for="woocommerce_eh_stripe_test_oauth">Stripe account </label> … … 373 385 } 374 386 else{ 375 $install_link = Eh_Stripe_Admin_Handler::wt_get_install_link($mode); 387 388 $html = $this->generate_test_mode_switch_button_html(); 389 $install_link = Eh_Stripe_Admin_Handler::wt_get_install_link($mode, $test_mode_type); 376 390 $message = __("You are in test mode. Connect to Stripe in live mode to receive payments.", "payment-gateway-stripe-and-woocommerce-integration"); 377 $html = '<div class="wtst-notice wtst-notice-warning " ><div style="padding:10px">' . $message .'</div></div><tr valign="top"><td colspan="2" class="forminp forminp-' . sanitize_text_field($value['type']) . '"><div class="wtst-oauth-banner">391 $html .= '<div class="wtst-notice wtst-notice-warning " ><div style="padding:10px">' . $message .'</div></div><tr valign="top"><td colspan="2" class="forminp forminp-' . sanitize_text_field($value['type']) . '"><div class="wtst-oauth-banner"> 378 392 <div class="wtst-oauth-banner-img" style="background-image: url(' . esc_url(EH_STRIPE_MAIN_URL_PATH."assets/img/oauth-banner.svg" ). ')"></div> 379 393 <div class="wtst-oauth-banner-container"><div>' . esc_html__("Connect your Stripe account to start testing", "payment-gateway-stripe-and-woocommerce-integration") .'</div> … … 389 403 !empty(EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => 'wt_stripe_access_token_live')))) { 390 404 $wt_stripe_account_id = EH_Stripe_Token_Handler::wtst_get_site_option('get', array('name' => 'wt_stripe_account_id_live')); 391 392 $html = '<tr valign="top">405 $html = $this->get_oauth_connection_warning_html($settings); 406 $html .= '<tr valign="top"> 393 407 <th scope="row" class="titledesc"> 394 408 <label for="woocommerce_eh_stripe_live_oauth">Stripe account </label> … … 403 417 $install_link = Eh_Stripe_Admin_Handler::wt_get_install_link($mode); 404 418 405 $html = '<tr valign="top"><td colspan="2" class="forminp forminp-' . sanitize_text_field($value['type']) . '"><div class="wtst-oauth-banner">419 $html = '<tr valign="top"><td colspan="2" class="forminp forminp-' . sanitize_text_field($value['type']) . '"><div class="wtst-oauth-banner"> 406 420 <div class="wtst-oauth-banner-img" style="background-image: url(' . esc_url(EH_STRIPE_MAIN_URL_PATH."assets/img/oauth-banner.svg" ). ')"></div> 407 421 <div class="wtst-oauth-banner-container"><div>' . esc_html__("You haven’t connected your Stripe account yet. Connect now to start receiving payments", "payment-gateway-stripe-and-woocommerce-integration") .'</div> … … 449 463 return $html; 450 464 } 451 452 465 /** 466 * 467 * Function to generate payment mode switch html 468 * @since 5.0.7 469 */ 470 public function generate_test_mode_switch_button_html(){ 471 472 $current_mode = get_option("woocommerce_eh_stripe_test_mode_type", 'test'); 473 $test_mode_text = $current_mode === 'sandbox' ? __('Sandbox', 'payment-gateway-stripe-and-woocommerce-integration') : __('Test', 'payment-gateway-stripe-and-woocommerce-integration'); 474 $html = sprintf( 475 '<tr> 476 <th scope="row" style="width:100px;" >%1$s : %2$s</th> 477 <td> 478 479 <input type="hidden" name="woocommerce_eh_stripe_test_mode_type_hidden" id="woocommerce_eh_stripe_test_mode_type_hidden" value="%3$s" /> 480 <p><em>Stripe supports two test modes: “Test” and “Sandbox”. Choose the appropriate mode based on your integration setup.</em></p> 481 482 <span> 483 <a href="#" id="th_test_mode_type" style="display:%4$s;">%5$s</a> 484 <a href="#" id="th_sandbox_mode_type" style="display:%6$s;">%7$s</a> 485 </span> 486 </td> 487 </tr>', 488 esc_html__('Test Mode', 'payment-gateway-stripe-and-woocommerce-integration'), 489 esc_html($test_mode_text), 490 esc_attr($current_mode), // for hidden input 491 esc_attr($current_mode === 'test' ? 'inline-block' : 'none'), 492 esc_html__('Switch to Sandbox Mode', 'payment-gateway-stripe-and-woocommerce-integration'), 493 esc_attr($current_mode === 'sandbox' ? 'inline-block' : 'none'), 494 esc_html__('Switch to Test Mode', 'payment-gateway-stripe-and-woocommerce-integration') 495 ); 496 497 return $html; 498 } 499 500 public function get_oauth_connection_warning_html( $stripe_settings ) { 501 502 if ( empty( $stripe_settings ) ) { 503 return ''; 504 } 505 506 $app_author = get_option( 'eh_stripe_connected_app_author', '' ); 507 508 // Show warning unless explicitly connected via ThemeHigh 509 if ( $app_author !== 'themehigh' ) { 510 return '<tr valign="top"> 511 <td colspan="2" class="forminp"> 512 <div class="wtst-oauth-warning" style="background:#f8d7da;border-left:4px solid #dc3545;padding:12px 15px;border-radius:4px;display:flex;align-items:center;"> 513 <span style="color:#dc3545;font-size:18px;margin-right:10px;">⚠</span> 514 <span style="color:#721c24;font-size:14px;line-height:1.5;font-weight:500;"> 515 ' . esc_html__( 516 'If you are currently connected through WebToffee, please disconnect and reconnect using ThemeHigh. The WebToffee connection will be discontinued soon.', 517 'payment-gateway-stripe-and-woocommerce-integration' 518 ) . ' 519 </span> 520 </div> 521 </td> 522 </tr>'; 523 } 524 525 return ''; 526 } 453 527 454 528 } -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-ideal.php
r3351963 r3433172 71 71 'type' => 'title', 72 72 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 73 'description' => sprintf(__('%1$sSupported currency: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s %6$s Read documentation %7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#ideal">', '</a></p>'),73 'description' => sprintf(__('%1$sSupported currency: %2$sEUR%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s %6$s Read documentation %7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-ideal-payment-method-for-a-woocommerce-store/">', '</a></p>'), 74 74 ), 75 75 'eh_stripe_ideal_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-klarna.php
r3351963 r3433172 68 68 'type' => 'title', 69 69 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 70 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR, USD, GBP, DKK, SEK, NOK%3$s %4$sStripe accounts in the following countries can accept the payment: %5$sAustria, Belgium, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Italy, Latvia, Lithuania, Netherlands, Norway, Slovakia, Slovenia, Spain, Sweden, United Kingdom, United States %6$s %7$s Read documentation %8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#klarna">', '</a></p>', ''),70 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR, USD, GBP, DKK, SEK, NOK%3$s %4$sStripe accounts in the following countries can accept the payment: %5$sAustria, Belgium, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Italy, Latvia, Lithuania, Netherlands, Norway, Slovakia, Slovenia, Spain, Sweden, United Kingdom, United States %6$s %7$s Read documentation %8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-klarna-payment-method-for-a-woocommerce-store/">', '</a></p>', ''), 71 71 ), 72 72 'eh_stripe_klarna_form_title' => array( … … 107 107 'type' => 'title', 108 108 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 109 'description' => sprintf(__('%1$sTo accept payments via Klarna payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),109 'description' => sprintf(__('%1$sTo accept payments via Klarna payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 110 110 ), 111 111 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-oauth.php
r3351963 r3433172 24 24 /** 25 25 * 26 * Function to retrieve tokens send from Stripe to WebToffeeserver and save tokens to db26 * Function to retrieve tokens send from Stripe to ThemeHigh server and save tokens to db 27 27 * @since 4.0.0 28 28 */ … … 44 44 $account_id = (isset($decoded['account_id']) ? sanitize_text_field($decoded['account_id']) : ''); 45 45 $stripe_publishable_key = (isset($decoded['stripe_publishable_key']) ? sanitize_text_field($decoded['stripe_publishable_key']) : ''); 46 //Check connection platform 47 $app_author = (isset($decoded['author']) && isset($decoded['author']) ) ? sanitize_text_field($decoded['author']) : null; 46 48 47 49 $arr_oauth_tokens = array( … … 55 57 $stripe_settings = get_option("woocommerce_eh_stripe_pay_settings"); 56 58 $mode = (isset($stripe_settings["eh_stripe_mode"]) ? $stripe_settings["eh_stripe_mode"] : 'live'); 59 60 $test_mode = get_option("woocommerce_eh_stripe_test_mode_type"); 61 $test_mode = ($test_mode === 'sandbox' ) ? 'sandbox' : 'test'; 57 62 58 63 if('test' === $mode){ 59 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 60 'name' => 'wt_stripe_account_id_test', 61 'value' => $account_id 62 )); 63 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 64 'name' => 'wt_stripe_access_token_test', 65 'value' => base64_encode($access_token) 66 )); 67 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 68 'name' => 'wt_stripe_refresh_token_test', 69 'value' => base64_encode($refresh_token) 70 )); 71 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 72 'name' => 'wt_stripe_test_publishable_key', 73 'value' => $stripe_publishable_key 74 )); 75 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 76 'name' => 'wtst_oauth_expriy_test', 77 'value' => time() 78 )); 79 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 80 'name' => 'wt_stripe_oauth_connected_test', 81 'value' => 'yes' 82 )); 83 64 if($test_mode === 'sandbox'){ 65 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 66 'name' => 'wt_stripe_account_id_sandbox', 67 'value' => $account_id 68 )); 69 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 70 'name' => 'wt_stripe_access_token_sandbox', 71 'value' => base64_encode($access_token) 72 )); 73 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 74 'name' => 'wt_stripe_refresh_token_sandbox', 75 'value' => base64_encode($refresh_token) 76 )); 77 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 78 'name' => 'wt_stripe_sandbox_publishable_key', 79 'value' => $stripe_publishable_key 80 )); 81 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 82 'name' => 'wtst_oauth_expriy_sandbox', 83 'value' => time() 84 )); 85 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 86 'name' => 'wt_stripe_oauth_connected_sandbox', 87 'value' => 'yes' 88 )); 89 90 }else{ 91 92 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 93 'name' => 'wt_stripe_account_id_test', 94 'value' => $account_id 95 )); 96 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 97 'name' => 'wt_stripe_access_token_test', 98 'value' => base64_encode($access_token) 99 )); 100 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 101 'name' => 'wt_stripe_refresh_token_test', 102 'value' => base64_encode($refresh_token) 103 )); 104 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 105 'name' => 'wt_stripe_test_publishable_key', 106 'value' => $stripe_publishable_key 107 )); 108 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 109 'name' => 'wtst_oauth_expriy_test', 110 'value' => time() 111 )); 112 EH_Stripe_Token_Handler::wtst_get_site_option('update', array( 113 'name' => 'wt_stripe_oauth_connected_test', 114 'value' => 'yes' 115 )); 116 } 84 117 $stripe_settings['eh_stripe_mode'] = 'test'; 85 118 update_option("woocommerce_eh_stripe_pay_settings", $stripe_settings); … … 118 151 EH_Stripe_Oauth::eh_stripe_schedule_oauth_refresh(); 119 152 } 153 154 update_option('eh_stripe_connected_app_author', $app_author); 120 155 121 156 }else{ … … 180 215 $mode = (isset($_REQUEST['mode']) ? sanitize_text_field( wp_unslash($_REQUEST['mode']) ): $mode); 181 216 if('test' === $mode){ 182 //phpcs:ignore WordPress.Security.NonceVerification.Recommended 183 if(isset($_REQUEST['expire']) && 'access_token' === sanitize_text_field(wp_unslash($_REQUEST['expire'])) ){ 184 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wtst_oauth_expriy_test')); 185 EH_Stripe_Token_Handler::wtst_get_site_option('delete', null, array('name' => 'wtst_refresh_token_calling')); 186 } 187 else{ 188 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_account_id_test')); 189 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_access_token_test')); 190 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_refresh_token_test')); 191 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_oauth_connected_test')); 192 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wtst_oauth_expriy_test')); 193 EH_Stripe_Token_Handler::wtst_get_site_option('delete', null, array('name' => 'wtst_refresh_token_calling')); 194 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_test_publishable_key')); 217 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 218 if($test_mode === 'sandbox'){ 219 if(isset($_REQUEST['expire']) && 'access_token' === sanitize_text_field($_REQUEST['expire']) ){ 220 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wtst_oauth_expriy_sandbox')); 221 EH_Stripe_Token_Handler::wtst_get_site_option('delete', null, array('name' => 'wtst_refresh_token_calling')); 222 }else{ 223 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_account_id_sandbox')); 224 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_access_token_sandbox')); 225 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_refresh_token_sandbox')); 226 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_sandbox_publishable_key')); 227 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_oauth_connected_sandbox')); 228 229 } 230 }else{ 231 //phpcs:ignore WordPress.Security.NonceVerification.Recommended 232 if(isset($_REQUEST['expire']) && 'access_token' === sanitize_text_field(wp_unslash($_REQUEST['expire'])) ){ 233 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wtst_oauth_expriy_test')); 234 EH_Stripe_Token_Handler::wtst_get_site_option('delete', null, array('name' => 'wtst_refresh_token_calling')); 235 } 236 else{ 237 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_account_id_test')); 238 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_access_token_test')); 239 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_refresh_token_test')); 240 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_oauth_connected_test')); 241 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wtst_oauth_expriy_test')); 242 EH_Stripe_Token_Handler::wtst_get_site_option('delete', null, array('name' => 'wtst_refresh_token_calling')); 243 EH_Stripe_Token_Handler::wtst_get_site_option('delete', array('name' => 'wt_stripe_test_publishable_key')); 244 } 195 245 } 196 246 … … 239 289 // Check if the connection is disabled 240 290 $settings = get_option("woocommerce_eh_stripe_pay_settings"); 241 $mode = isset($settings['eh_stripe_mode']) ? $settings['eh_stripe_mode'] : 'live'; 291 $mode = isset($settings['eh_stripe_mode']) ? $settings['eh_stripe_mode'] : 'live'; 292 $test_mode = EH_Stripe_Token_Handler::get_stripe_test_mode_type(); 293 $mode = ($settings['eh_stripe_mode']==='test' && $test_mode === 'sandbox') ? 'sandbox' : $mode; 242 294 $connection_key = 'wt_stripe_oauth_connected_' . $mode; 243 295 -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-oxxo.php
r3351963 r3433172 108 108 'type' => 'title', 109 109 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 110 'description' => sprintf(__('%1$sTo accept payments via OXXO payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),110 'description' => sprintf(__('%1$sTo accept payments via OXXO payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 111 111 ), 112 112 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-p24.php
r3351963 r3433172 68 68 'type' => 'title', 69 69 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 70 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR, PLN%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#przelewy24">', '</a></p>'),70 'description' => sprintf(__('%1$sSupported currencies: %2$sEUR, PLN%3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$sRead documentation%7$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>', '</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-przelewy24-payment-method-for-a-woocommerce-store/">', '</a></p>'), 71 71 ), 72 72 'eh_stripe_p24_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-payment-request-tab.php
r3348088 r3433172 25 25 'type' => 'title', 26 26 /* translators: %1$s: "To use Google Pay," text, %2$s: Domain registration instructions, %3$s: HTTPS requirement text, %4$s: "Payment methods are only available when you use a" text, %5$s: "supported browser" text */ 27 'description' => sprintf(__( 'Google Pay allows customers to make payments using any credit or debit card saved to their Google Account. It works when customers have Google Pay set up on their devices <div class="wt_info_div"><p> %1$s </p><ol><li>Enable Google Pay in your Stripe <a href="https://dashboard.stripe.com/settings/payment_methods">payment methods settings</a>.</li><li>Register your domain</li><ul class="wt_notice_bar_style"><li> %2$s </li></ul><li>%3$s</li></ol> <p> %4$s <a href="https://docs.stripe.com/elements/express-checkout-element#supported-browsers" target="_blank">%5$s</a> and pay in a supported currency.</p> </div>.<p> <a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#google_pay"> Read documentation </a></p> ','payment-gateway-stripe-and-woocommerce-integration' ), __('To use Google Pay,', 'payment-gateway-stripe-and-woocommerce-integration'), __('To do this, navigate to <a href="https://dashboard.stripe.com/settings/payment_method_domains"> Settings > Payments > Payment method domains </a> from your Stripe dashboard and add your domain. All domains, whether in production or testing, must be registered. Don\'t register your domain more than once per account.', 'payment-gateway-stripe-and-woocommerce-integration'), __('To accept Google Pay payments on the web, you need to serve from an HTTPS webpage with a TLS domain-validated certificate.', 'payment-gateway-stripe-and-woocommerce-integration'), __('Payment methods are only available when you use a ', 'payment-gateway-stripe-and-woocommerce-integration'), __(' supported browser', 'payment-gateway-stripe-and-woocommerce-integration')),27 'description' => sprintf(__( 'Google Pay allows customers to make payments using any credit or debit card saved to their Google Account. It works when customers have Google Pay set up on their devices <div class="wt_info_div"><p> %1$s </p><ol><li>Enable Google Pay in your Stripe <a href="https://dashboard.stripe.com/settings/payment_methods">payment methods settings</a>.</li><li>Register your domain</li><ul class="wt_notice_bar_style"><li> %2$s </li></ul><li>%3$s</li></ol> <p> %4$s <a href="https://docs.stripe.com/elements/express-checkout-element#supported-browsers" target="_blank">%5$s</a> and pay in a supported currency.</p> </div>.<p> <a target="_blank" href="https://www.themehigh.com/docs/stripe-payment-plugin-for-woocommerce-free/#google_pay"> Read documentation </a></p> ','payment-gateway-stripe-and-woocommerce-integration' ), __('To use Google Pay,', 'payment-gateway-stripe-and-woocommerce-integration'), __('To do this, navigate to <a href="https://dashboard.stripe.com/settings/payment_method_domains"> Settings > Payments > Payment method domains </a> from your Stripe dashboard and add your domain. All domains, whether in production or testing, must be registered. Don\'t register your domain more than once per account.', 'payment-gateway-stripe-and-woocommerce-integration'), __('To accept Google Pay payments on the web, you need to serve from an HTTPS webpage with a TLS domain-validated certificate.', 'payment-gateway-stripe-and-woocommerce-integration'), __('Payment methods are only available when you use a ', 'payment-gateway-stripe-and-woocommerce-integration'), __(' supported browser', 'payment-gateway-stripe-and-woocommerce-integration')), 28 28 29 29 ), -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-sepa-pay.php
r3351963 r3433172 77 77 'type' => 'title', 78 78 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 79 'description' => sprintf(__('%1$s Supported currency: %2$s EUR %3$sStripe accounts in the following countries can accept the payment: %4$sAustralia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States%5$s%6$s%7$s Read documentation %8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b></li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#sepa_pay">', '</a></p>', ''),79 'description' => sprintf(__('%1$s<ul><li>%2$sSupported currency:%3$s EUR</li><li>%2$sStripe accounts in the following countries can accept this payment:%3$s Australia, Austria, Belgium, Bulgaria, Canada, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom, United States</li></ul><p><a target="_blank" href="https://www.themehigh.com/docs/set-up-sepa-payment-method-for-a-woocommerce-store/">Read documentation</a></p>%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div">', '<b>', '</b>', '</div>'), 80 80 ), 81 81 'eh_stripe_sepa_form_title' => array( … … 116 116 'type' => 'title', 117 117 /* translators: %1$s: Opening HTML div and paragraph tags, %2$s: Documentation link opening, %3$s: Documentation link closing, %4$s: Closing HTML paragraph and div tags */ 118 'description' => sprintf(__('%1$sTo accept payments via SEPA payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www. webtoffee.com/setting-up-webhooks-and-supported-webhooks/">', '</a>', '</p></div>'),118 'description' => sprintf(__('%1$sTo accept payments via SEPA payment method, you must configure the webhook endpoint and subscribe to relevant events. %2$sClick here%3$s to know more%4$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><p>', '<a target="_blank" href="https://www.themehigh.com/docs/configuring-webhook-endpoints-to-receive-woocommerce-order-status-updates/">', '</a>', '</p></div>'), 119 119 ), 120 120 ); -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/class-stripe-wechat.php
r3351963 r3433172 79 79 'type' => 'title', 80 80 /* translators: %1$s: Opening HTML div and list tags, %2$s: Bold tag opening, %3$s: Bold tag closing, %4$s: Bold tag opening, %5$s: Bold tag closing, %6$s: Closing HTML list and div tags, %7$s: Documentation link opening, %8$s: Documentation link closing */ 81 'description' => sprintf(__('%1$sSupported currencies: %2$sCNY, AUD, CAD, EUR, GBP, HKD, JPY, SGD, USD, DKK, NOK, SEK, CHF%3$s %4$sStripe accounts in the following countries can accept the payment: %5$sAustralia, Austria, Belgium, Canada, Denmark, Finland, France, Germany, Hong Kong, Ireland, Italy, Japan, Luxembourg, Netherlands, Norway, Portugal, Singapore, Spain, Sweden, Switzerland, United Kingdom, United States%6$s %7$s Read documentation %8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/#wechat">', '</a></p>', ''),81 'description' => sprintf(__('%1$sSupported currencies: %2$sCNY, AUD, CAD, EUR, GBP, HKD, JPY, SGD, USD, DKK, NOK, SEK, CHF%3$s %4$sStripe accounts in the following countries can accept the payment: %5$sAustralia, Austria, Belgium, Canada, Denmark, Finland, France, Germany, Hong Kong, Ireland, Italy, Japan, Luxembourg, Netherlands, Norway, Portugal, Singapore, Spain, Sweden, Switzerland, United Kingdom, United States%6$s %7$s Read documentation %8$s', 'payment-gateway-stripe-and-woocommerce-integration'), '<div class="wt_info_div"><ul><li>', '<b>','</b>', '</li><li>', '<b>', '</b></li></ul></div>', '<p><a target="_blank" href="https://www.themehigh.com/docs/set-up-wechat-payment-method-for-a-woocommerce-store/">', '</a></p>', ''), 82 82 ), 83 83 'eh_stripe_wechat_form_title' => array( -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/eh-goto-pro.php
r3351963 r3433172 153 153 </ul> 154 154 <div class="eh_section_button"> 155 <a href="https://www. webtoffee.com/product/woocommerce-stripe-payment-gateway/?utm_source=free_plugin_sidebar&utm_medium=Stripe_basic&utm_campaign=Stripe&utm_content=<?php echo esc_attr(EH_STRIPE_VERSION); ?>" target="_blank">155 <a href="https://www.themehigh.com/product/woocommerce-stripe-payment-gateway/" target="_blank"> 156 156 <img src="<?php echo esc_url(EH_STRIPE_MAIN_URL_PATH.'assets/img/white-crown.svg'); ?>" alt="Crown" style="width:16px; vertical-align:middle; margin-right:6px;"> 157 157 <?php esc_html_e('Upgrade to Premium', 'payment-gateway-stripe-and-woocommerce-integration'); ?> … … 165 165 <div class="eh_section_header" style="background-color: #DDF9E4;"> 166 166 <img src="<?php echo esc_url(EH_STRIPE_MAIN_URL_PATH.'assets/img/subscription-cta.svg'); ?>" alt="Calendar Icon"> 167 <span><?php esc_html_e(' WebToffeeWooCommerce Subscription Plugin', 'payment-gateway-stripe-and-woocommerce-integration'); ?></span>167 <span><?php esc_html_e('ThemeHigh WooCommerce Subscription Plugin', 'payment-gateway-stripe-and-woocommerce-integration'); ?></span> 168 168 </div> 169 169 <div class="eh_section_content"> … … 182 182 </ul> 183 183 <div class="eh_section_button"> 184 <a href="https://www. webtoffee.com/product/woocommerce-subscription/?utm_source=free_plugin_sidebar&utm_medium=Stripe_basic&utm_campaign=Stripe&utm_content=<?php echo esc_attr(EH_STRIPE_VERSION); ?>" target="_blank">184 <a href="https://www.themehigh.com/product/subscriptions-for-woocommerce/" target="_blank"> 185 185 <img src="<?php echo esc_url(EH_STRIPE_MAIN_URL_PATH.'assets/img/white-crown.svg'); ?>" alt="Crown" style="width:16px; vertical-align:middle; margin-right:6px;"> 186 186 <?php esc_html_e('Get woo Subscription', 'payment-gateway-stripe-and-woocommerce-integration'); ?> … … 203 203 </div> 204 204 </div> 205 205 <?php /* 206 206 <!-- Like This Plugin --> 207 207 <div class="eh_like_plugin"> … … 215 215 </p> 216 216 </div> 217 */ ?> -
payment-gateway-stripe-and-woocommerce-integration/trunk/includes/log.php
r3351963 r3433172 9 9 public static function init_live_log() 10 10 { 11 $content="<------------------- WebToffeeStripe Payment Live Log File ( ".EH_STRIPE_VERSION." ) ------------------->\n";11 $content="<------------------- ThemeHigh Stripe Payment Live Log File ( ".EH_STRIPE_VERSION." ) ------------------->\n"; 12 12 return $content; 13 13 } 14 14 public static function init_dead_log() 15 15 { 16 $content="<------------------- WebToffeeStripe Payment Dead Log File ( ".EH_STRIPE_VERSION." ) ------------------->\n";16 $content="<------------------- ThemeHigh Stripe Payment Dead Log File ( ".EH_STRIPE_VERSION." ) ------------------->\n"; 17 17 return $content; 18 18 } … … 25 25 { 26 26 $log = wc_get_logger(); 27 $head="<------------------- WebToffeeStripe Payment ( ".$title." ) ------------------->\n";27 $head="<------------------- ThemeHigh Stripe Payment ( ".$title." ) ------------------->\n"; 28 28 switch ($type) 29 29 { … … 52 52 { 53 53 $log=new WC_Logger(); 54 $head="<------------------- WebToffeeStripe Payment ( ".$title." ) ------------------->\n";54 $head="<------------------- ThemeHigh Stripe Payment ( ".$title." ) ------------------->\n"; 55 55 switch ($type) 56 56 { -
payment-gateway-stripe-and-woocommerce-integration/trunk/payment-gateway-stripe-and-woocommerce-integration.php
r3351963 r3433172 1 1 <?php 2 2 /* 3 * Plugin Name: Payment Gateway for Stripe andfor WooCommerce3 * Plugin Name: Payment Gateway of Stripe for WooCommerce 4 4 * Requires Plugins: woocommerce 5 5 * Plugin URI: https://wordpress.org/plugins/payment-gateway-stripe-and-woocommerce-integration/ 6 6 * Description: Accept payments from your WooCommerce store via Credit/Debit Cards, Stripe Checkout, Apple Pay, Google Pay, Alipay, SEPA Pay, Klarna, Afterpay, WeChat Pay, iDEAL, Bancontact, EPS, P24, Bacs Debit, BECS Debit, FPX, Boleto, OXXO, GrabPay, Multibanco and Affirm using Stripe. 7 * Author: WebToffee8 * Author URI: https://www. webtoffee.com/product/woocommerce-stripe-payment-gateway/9 * Version: 5.0. 610 * WC requires at least: 3.011 * WC tested up to: 10. 0.27 * Author: ThemeHigh 8 * Author URI: https://www.themehigh.com 9 * Version: 5.0.7 10 * WC requires at least: 7.0 11 * WC tested up to: 10.4 12 12 * License: GPLv3 13 13 * License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 27 27 } 28 28 if (!defined('EH_STRIPE_VERSION')) { 29 define('EH_STRIPE_VERSION', '5.0. 6');29 define('EH_STRIPE_VERSION', '5.0.7'); 30 30 } 31 31 if (!defined('EH_STRIPE_MAIN_FILE')) { … … 40 40 if (!defined('EH_STRIPE_OAUTH_WT_URL')) { 41 41 define ( 'EH_STRIPE_OAUTH_WT_URL', 'https://verify-stripe.webtoffee.com/wp-json/wt-stripe/v1/' ); 42 } 43 if (!defined('EH_STRIPE_OAUTH_TH_URL')) { 44 //themehigh updated url 45 define ( 'EH_STRIPE_OAUTH_TH_URL', 'https://verify-stripe.themehigh.com/wp-json/wt-stripe/v1/' ); 42 46 } 43 47 … … 80 84 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'eh_stripe_plugin_action_links'); 81 85 eh_stripe_init(); 82 add_filter( "wt_promotion_banner_screens", "wt_promotion_banner_screens" );86 // add_filter( "wt_promotion_banner_screens", "wt_promotion_banner_screens" ); 83 87 } else{ 84 88 … … 101 105 "Selected plugins activated." 102 106 ); 103 $new = "<span style='color:red'>Stripe Payment for Woocommerce ( BASIC ) ( WebToffee)-</span> Plugin Needs WooCommerce to Work.";107 $new = "<span style='color:red'>Stripe Payment for Woocommerce ( BASIC ) (ThemeHigh)-</span> Plugin Needs WooCommerce to Work."; 104 108 if (in_array($untranslated_text, $old, true)) { 105 109 $translated_text = $new; … … 113 117 $plugin_links = array( 114 118 '<a href="' . $setting_link . '">' . __('Settings', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>', 115 '<a href="https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/" target="_blank">' . __('Documentation', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>',116 '<a href="https://www. webtoffee.com/product/woocommerce-stripe-payment-gateway/?utm_source=free_plugin_sidebar&utm_medium=Stripe_basic&utm_campaign=Stripe&utm_content='.EH_STRIPE_VERSION.'" target="_blank" style="color:#3db634;">' . __('Premium Upgrade', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>',117 '<a href="https://w ordpress.org/support/plugin/payment-gateway-stripe-and-woocommerce-integration/" target="_blank">' . __('Support', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>',119 '<a href="https://www.themehigh.com/docs/category/stripe-payment-gateway/" target="_blank">' . __('Documentation', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>', 120 '<a href="https://www.themehigh.com/product/woocommerce-stripe-payment-gateway/" target="_blank" style="color:#3db634;">' . __('Premium Upgrade', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>', 121 '<a href="https://www.themehigh.com/docs/support/" target="_blank">' . __('Support', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>', 118 122 // '<a href="https://wordpress.org/support/plugin/payment-gateway-stripe-and-woocommerce-integration/reviews/" target="_blank">' . __('Review', 'payment-gateway-stripe-and-woocommerce-integration') . '</a>', 119 123 … … 209 213 include_once(EH_STRIPE_MAIN_PATH . "includes/class-stripe-affirm.php"); 210 214 211 include_once(EH_STRIPE_MAIN_PATH . 'includes/admin/class-wt-promotion-banner.php');215 // include_once(EH_STRIPE_MAIN_PATH . 'includes/admin/class-wt-promotion-banner.php'); 212 216 213 217 … … 219 223 * Includes the Black Friday and Cyber Monday CTA banners for 2024 220 224 */ 221 require_once EH_STRIPE_MAIN_PATH . 'includes/admin/banner/class-wtst-bfcm-twenty-twenty-four.php';225 // require_once EH_STRIPE_MAIN_PATH . 'includes/admin/banner/class-wtst-bfcm-twenty-twenty-four.php'; 222 226 new Eh_Stripe_Admin_Handler(); 223 227 -
payment-gateway-stripe-and-woocommerce-integration/trunk/readme.txt
r3352474 r3433172 1 === Payment Gateway for Stripe and for WooCommerce===2 Contributors: webtoffee,themehigh3 Donate link: https://www. webtoffee.com/plugins/1 === Payment Gateway of Stripe for WooCommerce === 2 Contributors: themehigh 3 Donate link: https://www.themehigh.com/product/woocommerce-stripe-payment-gateway/ 4 4 Tags: stripe checkout, credit card, google pay, apple pay, stripe payments 5 5 Requires at least: 5.6 6 Tested up to: 6. 86 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 5.0. 68 Stable tag: 5.0.7 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html 11 11 12 Easily accept Stripe payments on your WooCommerce store — including credit cards, Apple Pay, Google Pay, and more. Get started with Stripe Checkout and the Stripe payment gateway in just a few minutes.12 Integrate Stripe Payment Gateway in WooCommerce and accept cards, Google Pay, Apple Pay, Klarna, Alipay, and more with seamless, secure checkout. 13 13 14 14 == Description == … … 17 17 ### Introduction ### 18 18 19 Payment Gateway for Stripe and for WooCommerce enables your store to accept a wide range of payment methods, including credit cards and debit cards (Visa, Mastercard, American Express, Discover, JCB, Diners Club), along with region-specific and digital wallets like Alipay, Apple Pay, Google Pay, Klarna, SEPA, Afterpay, iDEAL, and WeChat Pay — all through the Payment Gateway for Stripe and for WooCommerce plugin.19 Payment Gateway of Stripe for WooCommerce nables your store to accept a wide range of payment methods, including credit cards and debit cards (Visa, Mastercard, American Express, Discover, JCB, Diners Club), along with region-specific and digital wallets like Alipay, Apple Pay, Google Pay, Klarna, SEPA, Afterpay, iDEAL, and WeChat Pay — all through the Payment Gateway for Stripe and for WooCommerce plugin. 20 20 21 21 With this WooCommerce Stripe plugin, you can activate Stripe checkout on your store site and make Stripe payments with their credit or debit cards at the checkout. This ensures a smooth and secure payment experience for your users. … … 72 72 The Stripe checkout page is well optimized for conversion with less loading time, address auto-complete, real-time card validation, descriptive error messages, responsive checkout, [and more](https://stripe.com/in/payments/checkout). 73 73 74 To learn how to install the plugin, navigate to the Installation tab. For detailed guidance on the installation and setup of the plugin, refer to the [plugin documentation](https://www. webtoffee.com/woocommerce-stripe-payment-gateway-plugin-user-guide/).74 To learn how to install the plugin, navigate to the Installation tab. For detailed guidance on the installation and setup of the plugin, refer to the [plugin documentation](https://www.themehigh.com/docs/category/stripe-payment-gateway/). 75 75 76 76 … … 95 95 ## Payment Gateway for Stripe and for WooCommerce - Premium Features## 96 96 97 * Supports [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) and [Subscriptions for WooCommerce by WebToffee](https://www.webtoffee.com/product/woocommerce-subscriptions/).97 * Supports [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/) and [Subscriptions for WooCommerce by ThemeHigh](https://www.themehigh.com/product/subscriptions-for-woocommerce/). 98 98 * Link payment method 99 99 * Multiple payment methods in Stripe checkout … … 106 106 107 107 108 For complete list of features and details, please visit <a rel="nofollow" href="https://www. webtoffee.com/product/woocommerce-stripe-payment-gateway/">Stripe Payment Gateway for WooCommerce</a>108 For complete list of features and details, please visit <a rel="nofollow" href="https://www.themehigh.com/product/woocommerce-stripe-payment-gateway/">Stripe Payment Gateway for WooCommerce</a> 109 109 110 110 ### About Stripe ### … … 203 203 * **Privacy Policy**: [Stripe Privacy Policy](https://stripe.com/privacy) 204 204 205 ** WebToffee Service**: The plugin integrates with WebToffee's external service for OAuth token management and automatic token refresh functionality.206 207 * **Service Provider**: WebToffee, Inc.205 **ThemeHigh Service**: The plugin integrates with ThemeHigh's external service for OAuth token management and automatic token refresh functionality. 206 207 * **Service Provider**: ThemeHigh, Inc. 208 208 * **Data Sent**: OAuth tokens, connection status, and service health data 209 209 * **Purpose**: External service integration for Stripe OAuth management and token refresh 210 * **Privacy Policy**: [ WebToffee Privacy Policy](https://www.webtoffee.com/privacy-policy/)210 * **Privacy Policy**: [ThemeHigh Privacy Policy](https://www.themehigh.com/privacy-policy/) 211 211 212 212 … … 231 231 Step 2: Navigate to Plugins and select Add New. 232 232 Step 3: In the search bar, type “Payment Gateway for Stripe and for WooCommerce” and click Search Plugins. 233 Step 4: Once you find the Stripe Payment plugin by WebToffee, click on “Install Now”.233 Step 4: Once you find the Stripe Payment plugin by ThemeHigh, click on “Install Now”. 234 234 Step 5: After installation, click “Activate” to activate the plugin. 235 235 … … 287 287 288 288 == Changelog == 289 = 5.0.7 = 290 * [Ownership] – Plugin acquired by ThemeHigh. 291 * [Enhancement] - Updated OAuth with Themehigh Stripe app 292 * [Enhancement] - Sandbox mode (test mode) support added for Stripe payments. 293 * [Compatibility] - WordPress 6.9 294 * [Compatibility] - WooCommerce 10.4 289 295 290 296 = 5.0.6 2025-08-28 =
Note: See TracChangeset
for help on using the changeset viewer.