Changeset 2945267
- Timestamp:
- 07/31/2023 08:33:12 AM (3 years ago)
- Location:
- triplea-cryptocurrency-payment-gateway-for-woocommerce
- Files:
-
- 8 edited
- 1 copied
-
tags/2.0.8 (copied) (copied from triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk)
-
tags/2.0.8/assets/js/checkout.js (modified) (2 diffs)
-
tags/2.0.8/includes/WooCommerce/TripleA_Payment_Gateway.php (modified) (5 diffs)
-
tags/2.0.8/readme.txt (modified) (3 diffs)
-
tags/2.0.8/triplea-cryptocurrency-payment-gateway-for-woocommerce.php (modified) (2 diffs)
-
trunk/assets/js/checkout.js (modified) (2 diffs)
-
trunk/includes/WooCommerce/TripleA_Payment_Gateway.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/triplea-cryptocurrency-payment-gateway-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.8/assets/js/checkout.js
r2814849 r2945267 72 72 $('#triplea_embedded_payment_form_btn').hide(); 73 73 $('#triplea_embedded_payment_form_loading_txt').hide(); 74 75 triplea_freeze_checkout_form(); 74 76 75 77 triplea_createHiddenInputData('triplea_order_txid', response.order_txid); … … 259 261 } 260 262 } 261 263 function triplea_freeze_checkout_form(){ 264 var billingFieldsDiv = document.querySelector('.woocommerce-billing-fields'); 265 266 // Apply the blur effect using inline styles 267 billingFieldsDiv.style.webkitFilter = 'blur(5px)'; 268 billingFieldsDiv.style.mozFilter = 'blur(5px)'; 269 billingFieldsDiv.style.oFilter = 'blur(5px)'; 270 billingFieldsDiv.style.msFilter = 'blur(5px)'; 271 billingFieldsDiv.style.filter = 'blur(1px)'; 272 billingFieldsDiv.style.pointerEvents = 'none'; 273 billingFieldsDiv.style.position = 'relative'; 274 275 } 262 276 function triplea_validateCheckoutCallback(response) { 263 277 if (response.data && response.success === false) { -
triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.8/includes/WooCommerce/TripleA_Payment_Gateway.php
r2936473 r2945267 358 358 $self->logger->write_log( 'triplea_checkout_check() called.', $self->debugLog ); 359 359 360 $validation_done = false; 361 if (!is_null($errors)) { 362 $validation_done = true; 363 } 364 360 365 if (is_null($errors)) { 361 366 $self->logger->write_log( 'triplea_checkout_check() Form errors found.', $self->debugLog ); … … 369 374 if (empty($error_messages)) { 370 375 $self->logger->write_log( 'triplea_checkout_check() success.', $self->debugLog ); 376 377 if (has_action('woocommerce_checkout_process')) { 378 379 $self->logger->write_log( 'triplea_checkout_check() site has custom validation on woocommerce_checkout_process hoook.', $self->debugLog ); 380 381 // Run the custom validation 382 do_action('woocommerce_checkout_process'); 383 384 $error_messages = $errors->get_error_messages(); 385 386 $wc_notices = wc_get_notices(); 387 388 // Merge the WooCommerce notices with the validation errors 389 $error_messages = array_merge($error_messages, $wc_notices); 390 foreach ($error_messages as $message) { 391 $errors->add('validation', $message); 392 } 393 wc_clear_notices(); 394 if(!empty($error_messages)){ 395 396 if (isset($error_messages['error']) && count($error_messages['error']) > 1) { 397 $map = []; 398 $dup = []; 399 foreach ($error_messages['error'] as $key => $val) { 400 if (!array_key_exists($val['notice'], $map)) { 401 $map[$val['notice']] = $key; 402 } else { 403 $dup[] = $key; 404 } 405 } 406 foreach ($dup as $key => $val) { 407 unset($error_messages['error'][$val]); 408 } 409 sort($error_messages['error']); 410 } 411 $self->logger->write_log( 'triplea_checkout_check() custom validation: Form errors found.', $self->debugLog ); 412 //$self->logger->write_log(json_encode($error_messages), $self->debugLog ); 413 $self->logger->write_log( 'triplea_checkout_check() custom validationfailed.', $self->debugLog ); 414 wp_send_json_error( 415 [ 416 'messages' => $error_messages, 417 'status' => 'notok', 418 'from ' => 'triplea_checkout_check custom validation' 419 ] 420 ); 421 } 422 423 } 371 424 wp_send_json_success( 372 425 [ … … 376 429 } else { 377 430 $self->logger->write_log( 'triplea_checkout_check(): Form errors found.', $self->debugLog ); 431 //$self->logger->write_log(json_encode($error_messages)), $self->debugLog ); 432 // $self->logger->write_log(json_encode($error_messages), $self->debugLog ); 378 433 $self->logger->write_log( 'triplea_checkout_check() failed.', $self->debugLog ); 379 434 wp_send_json_error( … … 381 436 'messages' => $error_messages, 382 437 'status' => 'notok', 438 'from ' => 'triplea_checkout_check', 383 439 ] 384 440 ); … … 1599 1655 .'To be paid to '.$payment_data->crypto_currency.' address:' . '<br>' 1600 1656 . $bitcoin_address . "<br>" 1657 . "Payment reference: <br>" 1658 . $payment_data->payment_reference . "<br>" 1601 1659 . "<a href='https://www.blockchain.com/search?search=" . $bitcoin_address . "' target='_blank'>(View details on the blockchain)</a>"; 1602 1660 } -
triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.8/readme.txt
r2936473 r2945267 7 7 Requires at least: 5.5 8 8 Tested up to: 6.2.2 9 Stable tag: 2.0. 79 Stable tag: 2.0.8 10 10 Requires PHP: 7.0 11 11 License: GPLv2 or later … … 109 109 == Changelog == 110 110 111 = 2.0.8 = 112 Fixed: Check custom validation in checkout form before calling for payment form 113 Added: Blur effect on payment form 114 Added: Payment Reference added on Order Notes 115 111 116 = 2.0.7 = 112 117 Fixed: Unusual token request from elementor or javascript from frontend … … 272 277 == Upgrade Notice == 273 278 279 = 2.0.8 = 280 Simply install the update. No further action is needed. 281 274 282 = 2.0.7 = 275 283 Simply install the update. No further action is needed. -
triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.8/triplea-cryptocurrency-payment-gateway-for-woocommerce.php
r2936473 r2945267 17 17 * Plugin URI: https://wordpress.org/plugins/triplea-cryptocurrency-payment-gateway-for-woocommerce/ 18 18 * Description: Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by TripleA. 19 * Version: 2.0. 719 * Version: 2.0.8 20 20 * Author: TripleA Team 21 21 * Author URI: https://triple-a.io … … 45 45 * $var string 46 46 */ 47 const version = '2.0. 7';47 const version = '2.0.8'; 48 48 49 49 /* -
triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/assets/js/checkout.js
r2814849 r2945267 72 72 $('#triplea_embedded_payment_form_btn').hide(); 73 73 $('#triplea_embedded_payment_form_loading_txt').hide(); 74 75 triplea_freeze_checkout_form(); 74 76 75 77 triplea_createHiddenInputData('triplea_order_txid', response.order_txid); … … 259 261 } 260 262 } 261 263 function triplea_freeze_checkout_form(){ 264 var billingFieldsDiv = document.querySelector('.woocommerce-billing-fields'); 265 266 // Apply the blur effect using inline styles 267 billingFieldsDiv.style.webkitFilter = 'blur(5px)'; 268 billingFieldsDiv.style.mozFilter = 'blur(5px)'; 269 billingFieldsDiv.style.oFilter = 'blur(5px)'; 270 billingFieldsDiv.style.msFilter = 'blur(5px)'; 271 billingFieldsDiv.style.filter = 'blur(1px)'; 272 billingFieldsDiv.style.pointerEvents = 'none'; 273 billingFieldsDiv.style.position = 'relative'; 274 275 } 262 276 function triplea_validateCheckoutCallback(response) { 263 277 if (response.data && response.success === false) { -
triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/includes/WooCommerce/TripleA_Payment_Gateway.php
r2936473 r2945267 358 358 $self->logger->write_log( 'triplea_checkout_check() called.', $self->debugLog ); 359 359 360 $validation_done = false; 361 if (!is_null($errors)) { 362 $validation_done = true; 363 } 364 360 365 if (is_null($errors)) { 361 366 $self->logger->write_log( 'triplea_checkout_check() Form errors found.', $self->debugLog ); … … 369 374 if (empty($error_messages)) { 370 375 $self->logger->write_log( 'triplea_checkout_check() success.', $self->debugLog ); 376 377 if (has_action('woocommerce_checkout_process')) { 378 379 $self->logger->write_log( 'triplea_checkout_check() site has custom validation on woocommerce_checkout_process hoook.', $self->debugLog ); 380 381 // Run the custom validation 382 do_action('woocommerce_checkout_process'); 383 384 $error_messages = $errors->get_error_messages(); 385 386 $wc_notices = wc_get_notices(); 387 388 // Merge the WooCommerce notices with the validation errors 389 $error_messages = array_merge($error_messages, $wc_notices); 390 foreach ($error_messages as $message) { 391 $errors->add('validation', $message); 392 } 393 wc_clear_notices(); 394 if(!empty($error_messages)){ 395 396 if (isset($error_messages['error']) && count($error_messages['error']) > 1) { 397 $map = []; 398 $dup = []; 399 foreach ($error_messages['error'] as $key => $val) { 400 if (!array_key_exists($val['notice'], $map)) { 401 $map[$val['notice']] = $key; 402 } else { 403 $dup[] = $key; 404 } 405 } 406 foreach ($dup as $key => $val) { 407 unset($error_messages['error'][$val]); 408 } 409 sort($error_messages['error']); 410 } 411 $self->logger->write_log( 'triplea_checkout_check() custom validation: Form errors found.', $self->debugLog ); 412 //$self->logger->write_log(json_encode($error_messages), $self->debugLog ); 413 $self->logger->write_log( 'triplea_checkout_check() custom validationfailed.', $self->debugLog ); 414 wp_send_json_error( 415 [ 416 'messages' => $error_messages, 417 'status' => 'notok', 418 'from ' => 'triplea_checkout_check custom validation' 419 ] 420 ); 421 } 422 423 } 371 424 wp_send_json_success( 372 425 [ … … 376 429 } else { 377 430 $self->logger->write_log( 'triplea_checkout_check(): Form errors found.', $self->debugLog ); 431 //$self->logger->write_log(json_encode($error_messages)), $self->debugLog ); 432 // $self->logger->write_log(json_encode($error_messages), $self->debugLog ); 378 433 $self->logger->write_log( 'triplea_checkout_check() failed.', $self->debugLog ); 379 434 wp_send_json_error( … … 381 436 'messages' => $error_messages, 382 437 'status' => 'notok', 438 'from ' => 'triplea_checkout_check', 383 439 ] 384 440 ); … … 1599 1655 .'To be paid to '.$payment_data->crypto_currency.' address:' . '<br>' 1600 1656 . $bitcoin_address . "<br>" 1657 . "Payment reference: <br>" 1658 . $payment_data->payment_reference . "<br>" 1601 1659 . "<a href='https://www.blockchain.com/search?search=" . $bitcoin_address . "' target='_blank'>(View details on the blockchain)</a>"; 1602 1660 } -
triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/readme.txt
r2936473 r2945267 7 7 Requires at least: 5.5 8 8 Tested up to: 6.2.2 9 Stable tag: 2.0. 79 Stable tag: 2.0.8 10 10 Requires PHP: 7.0 11 11 License: GPLv2 or later … … 109 109 == Changelog == 110 110 111 = 2.0.8 = 112 Fixed: Check custom validation in checkout form before calling for payment form 113 Added: Blur effect on payment form 114 Added: Payment Reference added on Order Notes 115 111 116 = 2.0.7 = 112 117 Fixed: Unusual token request from elementor or javascript from frontend … … 272 277 == Upgrade Notice == 273 278 279 = 2.0.8 = 280 Simply install the update. No further action is needed. 281 274 282 = 2.0.7 = 275 283 Simply install the update. No further action is needed. -
triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/triplea-cryptocurrency-payment-gateway-for-woocommerce.php
r2936473 r2945267 17 17 * Plugin URI: https://wordpress.org/plugins/triplea-cryptocurrency-payment-gateway-for-woocommerce/ 18 18 * Description: Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by TripleA. 19 * Version: 2.0. 719 * Version: 2.0.8 20 20 * Author: TripleA Team 21 21 * Author URI: https://triple-a.io … … 45 45 * $var string 46 46 */ 47 const version = '2.0. 7';47 const version = '2.0.8'; 48 48 49 49 /*
Note: See TracChangeset
for help on using the changeset viewer.