Changeset 2124916
- Timestamp:
- 07/17/2019 10:41:34 PM (7 years ago)
- Location:
- helcim-commerce-for-woocommerce/trunk
- Files:
-
- 5 edited
-
assets/js/helcim-scripts.js (modified) (2 diffs)
-
class-wc-commerce-helcim.php (modified) (7 diffs)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
helcim-commerce-for-woocommerce/trunk/assets/js/helcim-scripts.js
r2105724 r2124916 546 546 var createaccount = document.getElementById('createaccount'); 547 547 var paymentMethod = document.getElementById('payment_method_helcimjs'); 548 var captchaField = document.getElementById('g-recaptcha-response'); 549 550 // CHECK FOR CAPTCHA 551 if (captchaField != null && captchaField.value == ""){ 552 generateCaptchaToken().then(function(value){ 553 hcmStartProcess(); 554 }); 555 return false; 556 } 548 557 549 558 // CLEAR RESPONSE … … 657 666 }, function(error){ 658 667 668 // CLEAR CAPTCHA ON ERROR 669 hcmCreateHiddenInputFields(woocommerceForm,'g-recaptcha-response',''); 670 659 671 // TRANSACTION FAILED 660 672 console.log(helcimResults.innerHTML); -
helcim-commerce-for-woocommerce/trunk/class-wc-commerce-helcim.php
r2105724 r2124916 11 11 * @class WC_Commerce_Helcim_JS 12 12 * @extends WC_Payment_Gateway 13 * @version 1.1. 613 * @version 1.1.7 14 14 * @author Helcim Inc. 15 15 */ … … 37 37 $this->commerce_url = 'https://secure.myhelcim.com/api/'; 38 38 $this->helcimjs_url = 'https://secure.myhelcim.com/js/version2.js'; 39 $this->version = '1.1. 6';39 $this->version = '1.1.7'; 40 40 41 41 // LOAD SETTINGS … … 54 54 $this->transactionType = $this->get_option( 'transactionType' ); 55 55 $this->terminalId = $this->get_option( 'terminalId' ); 56 $this->requireCaptcha = $this->get_option( 'requireCaptcha' ) == 'yes' ? 1 : 0; 56 57 57 58 if ($this->show_logo) … … 256 257 ); 257 258 259 // REQUIRE CAPTCHA 260 $this->form_fields['requireCaptcha'] = array( 261 'title' => __('Require Captcha', 'woocommerce' ), 262 'type' => 'checkbox', 263 'label' => __( 'Require Customer to Pass Captcha to avoid Fraud (Only works when Payment Method is Helcim JS)', 'woocommerce' ), 264 'default' => 'yes' 265 ); 266 258 267 } 259 268 … … 649 658 ?> 650 659 660 <?php if($this->requireCaptcha){ ?> 661 662 <!-- RECAPTCHA --> 663 <input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response"> 664 665 <?php if($this->isTest()){ echo("<script type='text/javascript' src='https://www.google.com/recaptcha/api.js?render=6LcgxK0UAAAAAH9gzsILRr82KZSLrBcry9RynMn4'></script>"); ?> 666 667 <script>var site_key = '6LcgxK0UAAAAAH9gzsILRr82KZSLrBcry9RynMn4';</script> 668 669 <?php }else{ echo("<script type='text/javascript' src='https://www.google.com/recaptcha/api.js?render=6LdixK0UAAAAABmBXVo_jyFJSkQ5Doj9kloLyxGG'></script>"); ?> 670 671 <script>var site_key = '6LdixK0UAAAAABmBXVo_jyFJSkQ5Doj9kloLyxGG';</script> 672 673 <?php } ?> 674 675 <script> 676 677 function generateCaptchaToken(){ 678 679 return new Promise(function(resolve, reject) { 680 681 grecaptcha.ready(function() { 682 683 grecaptcha.execute(site_key, {action: 'helcimJSCheckout'}) 684 685 .then(function(token) { 686 687 document.getElementById('g-recaptcha-response').value = token; 688 resolve(); 689 690 }); 691 692 }); 693 694 }); 695 696 } 697 698 </script> 699 700 <?php } ?> 701 651 702 <?php if($this->isJS()){ ?> 652 703 … … 657 708 <script type="text/javascript"> 658 709 659 // UPDATE SUBMIT BUTTON710 // UPDATE SUBMIT BUTTON 660 711 hcmUpdateSubmit(); 661 712 … … 716 767 <td><input type="text" class="input-text" size="4" value="" id="cardCVV" name="cardCVV"></td> 717 768 </tr> 769 718 770 </tbody> 719 771 </table> -
helcim-commerce-for-woocommerce/trunk/index.php
r2105724 r2124916 4 4 Plugin URI: https://www.helcim.com/ 5 5 Description: Helcim Commerce for WooCommerce 6 Version: 1.1. 66 Version: 1.1.7 7 7 Author: Helcim Inc. 8 8 Author URI: https://www.helcim.com/ -
helcim-commerce-for-woocommerce/trunk/readme.txt
r2105724 r2124916 73 73 == Changelog == 74 74 75 = 1.1.7 = 76 * Optimized Plugin 77 * Register and Checkout feature is now available 78 * Google reCAPTCHA v3 now available for Helcim.js payment method 79 75 80 = 1.1.6 = 76 81 * Optimized Plugin -
helcim-commerce-for-woocommerce/trunk/uninstall.php
r2105724 r2124916 5 5 * Uninstalls Helcim Gateway. 6 6 * 7 * @version 1.1. 67 * @version 1.1.7 8 8 * @author Helcim Inc. 9 9 */
Note: See TracChangeset
for help on using the changeset viewer.