Changeset 3297790
- Timestamp:
- 05/21/2025 06:46:51 AM (10 months ago)
- Location:
- gestpay-for-woocommerce
- Files:
-
- 6 edited
- 1 copied
-
tags/20250521 (copied) (copied from gestpay-for-woocommerce/trunk)
-
tags/20250521/gestpay-for-woocommerce.php (modified) (3 diffs)
-
tags/20250521/inc/class-gestpay-iframe.php (modified) (2 diffs)
-
tags/20250521/readme.txt (modified) (2 diffs)
-
trunk/gestpay-for-woocommerce.php (modified) (3 diffs)
-
trunk/inc/class-gestpay-iframe.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gestpay-for-woocommerce/tags/20250521/gestpay-for-woocommerce.php
r3297391 r3297790 4 4 * Plugin URI: http://wordpress.org/plugins/gestpay-for-woocommerce/ 5 5 * Description: Abilita il sistema di pagamento GestPay by Axerve (Gruppo Banca Sella) in WooCommerce. 6 * Version: 2025052 06 * Version: 20250521 7 7 * Requires at least: 4.7 8 8 * Requires PHP: 7.0 … … 213 213 $this->is_tokenization = $this->is_s2s || $this->is_iframe; 214 214 215 error_log('Gestpay Config - Account type: ' . $this->account); 216 error_log('Gestpay Config - is_s2s: ' . ($this->is_s2s ? 'true' : 'false')); 217 error_log('Gestpay Config - is_iframe: ' . ($this->is_iframe ? 'true' : 'false')); 218 error_log('Gestpay Config - is_tokenization: ' . ($this->is_tokenization ? 'true' : 'false')); 219 215 220 // For token+auth output a payment_box containing the direct payment form 216 221 $this->has_fields = $this->is_s2s; … … 327 332 if ( function_exists( 'is_checkout' ) && is_checkout() ) { 328 333 // Include TLS js by Gestpay 329 wp_enqueue_script( 'gestpay-TLSCHK_TE', '//sandbox.gestpay.net/pagam/javascript/TLSCHK_TE.js', array(), '201804', true ); 330 wp_enqueue_script( 'gestpay-TLSCHK_PRO', '//ecomm.sella.it/pagam/javascript/TLSCHK_PRO.js', array(), '201804', true ); 334 error_log('Gestpay Scripts - Caricamento script TLS e browser check'); 331 335 wp_enqueue_script( 'gestpay-checkBrowser', '//www.gestpay.it/checkbrowser/checkBrowser.js', array(), '201804', true ); 336 wp_enqueue_script( 'gestpay-TLSCHK_TE', '//sandbox.gestpay.net/pagam/javascript/TLSCHK_TE.js', array('gestpay-checkBrowser'), '201804', true ); 337 wp_enqueue_script( 'gestpay-TLSCHK_PRO', '//ecomm.sella.it/pagam/javascript/TLSCHK_PRO.js', array('gestpay-checkBrowser'), '201804', true ); 332 338 } 333 339 -
gestpay-for-woocommerce/tags/20250521/inc/class-gestpay-iframe.php
r3276807 r3297790 115 115 */ 116 116 public function receipt_page( $order ) { 117 117 error_log('Gestpay iFrame - Inizio receipt_page'); 118 118 $encString = $this->retrieve_encoded_string( $order ); 119 error_log('Gestpay iFrame - Stringa crittografata: ' . $encString); 119 120 120 121 // Maybe get the paRes parameter for 2nd call, due to 3D enrolled credit card 121 122 $paRes = ! empty( $_REQUEST["PaRes"] ) ? sanitize_text_field( wp_unslash( $_REQUEST["PaRes"] ) ) : ""; 122 123 $transKey = ! empty( $_COOKIE['TransKey'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['TransKey'] ) ) : ""; 124 error_log('Gestpay iFrame - paRes: ' . $paRes . ', transKey: ' . $transKey); 123 125 124 126 // Output the HTML for the iFrame payment box. 125 127 require_once 'checkout-payment-fields.php'; 126 128 wp_enqueue_script( 'gestpay-for-woocommerce-iframe-js', $this->Gestpay->iframe_url ); 129 error_log('Gestpay iFrame - Script iframe caricato: ' . $this->Gestpay->iframe_url); 127 130 ?> 128 131 … … 278 281 } 279 282 280 if ( BrowserEnabled) {281 // Check if the browser support HTML5 postmessage282 283 var a = '<?php echo esc_js( $this->Gestpay->shopLogin ); ?>';284 var b = '<?php echo esc_js( $encString ); ?>';285 286 // Create the iFrame287 GestPay.CreatePaymentPage( a, b, GestpayIframe.PaymentPageLoad );288 289 // Raise the Overlap layer and text290 document.getElementById( 'gestpay-freeze-pane' ).className = 'gestpay-freeze-pane-on';291 document.getElementById( 'gestpay-inner-freeze-pane-text' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_loading'] ); ?>';292 document.getElementById( 'gestpay-inner-freeze-pane' ).className = 'gestpay-on';293 }294 else {295 document.getElementById( 'gestpay-error-box' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_browser_err'] ); ?>';296 document.getElementById( 'gestpay-error-box' ).className = 'gestpay-on';297 }298 283 jQuery(document).ready(function($) { 284 if (typeof BrowserEnabled !== 'undefined' && BrowserEnabled) { 285 // Check if the browser support HTML5 postmessage 286 var a = '<?php echo esc_js( $this->Gestpay->shopLogin ); ?>'; 287 var b = '<?php echo esc_js( $encString ); ?>'; 288 289 // Create the iFrame 290 GestPay.CreatePaymentPage( a, b, GestpayIframe.PaymentPageLoad ); 291 292 // Raise the Overlap layer and text 293 document.getElementById( 'gestpay-freeze-pane' ).className = 'gestpay-freeze-pane-on'; 294 document.getElementById( 'gestpay-inner-freeze-pane-text' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_loading'] ); ?>'; 295 document.getElementById( 'gestpay-inner-freeze-pane' ).className = 'gestpay-on'; 296 } 297 else { 298 document.getElementById( 'gestpay-error-box' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_browser_err'] ); ?>'; 299 document.getElementById( 'gestpay-error-box' ).className = 'gestpay-on'; 300 } 301 }); 299 302 </script> 300 303 -
gestpay-for-woocommerce/tags/20250521/readme.txt
r3297391 r3297790 5 5 Requires PHP: 7.0 6 6 Tested up to: 6.8 7 Stable tag: 2025052 07 Stable tag: 20250521 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 69 69 == Changelog == 70 = 20250521 = 71 * Fix: Improved iframe payment loading and stability 72 - Fixed JavaScript loading order for payment scripts 73 - Added robust BrowserEnabled check 74 - Optimized iframe initialization code 75 - Fixed "BrowserEnabled is not defined" error 76 * Security: Nothing added 77 * Improvement: Enhanced payment iframe reliability 78 * Checks: Verified compatibility with WordPress 6.8, WooCommerce 9.4.2 79 * Note: This update improves the payment iframe stability and fixes loading issues 80 70 81 = 20250520 = 71 82 * Security: enforced CSRF protection -
gestpay-for-woocommerce/trunk/gestpay-for-woocommerce.php
r3297391 r3297790 4 4 * Plugin URI: http://wordpress.org/plugins/gestpay-for-woocommerce/ 5 5 * Description: Abilita il sistema di pagamento GestPay by Axerve (Gruppo Banca Sella) in WooCommerce. 6 * Version: 2025052 06 * Version: 20250521 7 7 * Requires at least: 4.7 8 8 * Requires PHP: 7.0 … … 213 213 $this->is_tokenization = $this->is_s2s || $this->is_iframe; 214 214 215 error_log('Gestpay Config - Account type: ' . $this->account); 216 error_log('Gestpay Config - is_s2s: ' . ($this->is_s2s ? 'true' : 'false')); 217 error_log('Gestpay Config - is_iframe: ' . ($this->is_iframe ? 'true' : 'false')); 218 error_log('Gestpay Config - is_tokenization: ' . ($this->is_tokenization ? 'true' : 'false')); 219 215 220 // For token+auth output a payment_box containing the direct payment form 216 221 $this->has_fields = $this->is_s2s; … … 327 332 if ( function_exists( 'is_checkout' ) && is_checkout() ) { 328 333 // Include TLS js by Gestpay 329 wp_enqueue_script( 'gestpay-TLSCHK_TE', '//sandbox.gestpay.net/pagam/javascript/TLSCHK_TE.js', array(), '201804', true ); 330 wp_enqueue_script( 'gestpay-TLSCHK_PRO', '//ecomm.sella.it/pagam/javascript/TLSCHK_PRO.js', array(), '201804', true ); 334 error_log('Gestpay Scripts - Caricamento script TLS e browser check'); 331 335 wp_enqueue_script( 'gestpay-checkBrowser', '//www.gestpay.it/checkbrowser/checkBrowser.js', array(), '201804', true ); 336 wp_enqueue_script( 'gestpay-TLSCHK_TE', '//sandbox.gestpay.net/pagam/javascript/TLSCHK_TE.js', array('gestpay-checkBrowser'), '201804', true ); 337 wp_enqueue_script( 'gestpay-TLSCHK_PRO', '//ecomm.sella.it/pagam/javascript/TLSCHK_PRO.js', array('gestpay-checkBrowser'), '201804', true ); 332 338 } 333 339 -
gestpay-for-woocommerce/trunk/inc/class-gestpay-iframe.php
r3276807 r3297790 115 115 */ 116 116 public function receipt_page( $order ) { 117 117 error_log('Gestpay iFrame - Inizio receipt_page'); 118 118 $encString = $this->retrieve_encoded_string( $order ); 119 error_log('Gestpay iFrame - Stringa crittografata: ' . $encString); 119 120 120 121 // Maybe get the paRes parameter for 2nd call, due to 3D enrolled credit card 121 122 $paRes = ! empty( $_REQUEST["PaRes"] ) ? sanitize_text_field( wp_unslash( $_REQUEST["PaRes"] ) ) : ""; 122 123 $transKey = ! empty( $_COOKIE['TransKey'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['TransKey'] ) ) : ""; 124 error_log('Gestpay iFrame - paRes: ' . $paRes . ', transKey: ' . $transKey); 123 125 124 126 // Output the HTML for the iFrame payment box. 125 127 require_once 'checkout-payment-fields.php'; 126 128 wp_enqueue_script( 'gestpay-for-woocommerce-iframe-js', $this->Gestpay->iframe_url ); 129 error_log('Gestpay iFrame - Script iframe caricato: ' . $this->Gestpay->iframe_url); 127 130 ?> 128 131 … … 278 281 } 279 282 280 if ( BrowserEnabled) {281 // Check if the browser support HTML5 postmessage282 283 var a = '<?php echo esc_js( $this->Gestpay->shopLogin ); ?>';284 var b = '<?php echo esc_js( $encString ); ?>';285 286 // Create the iFrame287 GestPay.CreatePaymentPage( a, b, GestpayIframe.PaymentPageLoad );288 289 // Raise the Overlap layer and text290 document.getElementById( 'gestpay-freeze-pane' ).className = 'gestpay-freeze-pane-on';291 document.getElementById( 'gestpay-inner-freeze-pane-text' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_loading'] ); ?>';292 document.getElementById( 'gestpay-inner-freeze-pane' ).className = 'gestpay-on';293 }294 else {295 document.getElementById( 'gestpay-error-box' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_browser_err'] ); ?>';296 document.getElementById( 'gestpay-error-box' ).className = 'gestpay-on';297 }298 283 jQuery(document).ready(function($) { 284 if (typeof BrowserEnabled !== 'undefined' && BrowserEnabled) { 285 // Check if the browser support HTML5 postmessage 286 var a = '<?php echo esc_js( $this->Gestpay->shopLogin ); ?>'; 287 var b = '<?php echo esc_js( $encString ); ?>'; 288 289 // Create the iFrame 290 GestPay.CreatePaymentPage( a, b, GestpayIframe.PaymentPageLoad ); 291 292 // Raise the Overlap layer and text 293 document.getElementById( 'gestpay-freeze-pane' ).className = 'gestpay-freeze-pane-on'; 294 document.getElementById( 'gestpay-inner-freeze-pane-text' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_loading'] ); ?>'; 295 document.getElementById( 'gestpay-inner-freeze-pane' ).className = 'gestpay-on'; 296 } 297 else { 298 document.getElementById( 'gestpay-error-box' ).innerHTML = '<?php echo esc_js( $this->Gestpay->strings['iframe_browser_err'] ); ?>'; 299 document.getElementById( 'gestpay-error-box' ).className = 'gestpay-on'; 300 } 301 }); 299 302 </script> 300 303 -
gestpay-for-woocommerce/trunk/readme.txt
r3297391 r3297790 5 5 Requires PHP: 7.0 6 6 Tested up to: 6.8 7 Stable tag: 2025052 07 Stable tag: 20250521 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 69 69 == Changelog == 70 = 20250521 = 71 * Fix: Improved iframe payment loading and stability 72 - Fixed JavaScript loading order for payment scripts 73 - Added robust BrowserEnabled check 74 - Optimized iframe initialization code 75 - Fixed "BrowserEnabled is not defined" error 76 * Security: Nothing added 77 * Improvement: Enhanced payment iframe reliability 78 * Checks: Verified compatibility with WordPress 6.8, WooCommerce 9.4.2 79 * Note: This update improves the payment iframe stability and fixes loading issues 80 70 81 = 20250520 = 71 82 * Security: enforced CSRF protection
Note: See TracChangeset
for help on using the changeset viewer.