1jQuery('body').on('click', '.payu-list-banks li.payu-active label', function () { 2 jQuery('.payu-list-banks label').removeClass('active'); 3 jQuery(this).addClass('active'); 4}); 5 6(function ($) { 7 $('body').on('click', '.payu-list-banks .payu-active', function () { 8 $('.pbl-error').slideUp(250); 9 }); 10 11 $('body').on('click', '.payu-conditions-description .payu-read-more', function () { 12 $(this).next('.payu-more-hidden').show(); 13 $(this).remove(); 14 }); 15 16 $('form#order_review').on('submit', function (e) { 17 var validateResult = validate_payu_checkout('form#order_review', e); 18 19 if (!validateResult) { 20 setTimeout(function () { 21 $('form#order_review').unblock(); 22 }, 1000); 23 } 24 25 return validateResult; 26 }); 27 28 $('form.checkout').on('checkout_place_order', function (e) { 29 return validate_payu_checkout('form.checkout', e); 30 }); 31 32 function validate_payu_checkout(form, e) { 33 var $payment_method = $(form).find('input[name="payment_method"]:checked').val(); 34 35 if ($payment_method === 'payusecureform') { 36 if ($('#response-tokenize').val() === '') { 37 try { 38 window.payuSdkForms.tokenize() 39 .then(function (result) { 40 $('.payu-sf-validation-error, .payu-sf-technical-error') 41 .html('') 42 .slideUp(250); 43 if (result.status === 'SUCCESS') { 44 $('#response-tokenize').val(result.body.token); 45 $(form).submit(); 46 } else { 47 $(result.error.messages).each(function (i, error) { 48 var source = error.source || 'technical'; 49 $('.payu-sf-' + error.type + '-error[data-type="' + source + '"]') 50 .html(error.message) 51 .slideDown(250); 52 $('html, body').animate({ 53 scrollTop: $('.card-container').offset().top 54 }, 300); 55 }); 56 } 57 }) 58 .catch(function (e) { 59 console.log(e); 60 }); 61 } catch (e) { 62 console.log(e); 63 } 64 65 return false; 66 } else { 67 return true; 68 } 69 } else if ($payment_method === 'payulistbanks') { 70 if (!$('.payu-list-banks').find('.payu-active .active').length) { 71 $('html, body').animate({ 72 scrollTop: $('.payu-list-banks').offset().top 73 }, 300); 74 $('.pbl-error').slideDown(250); 75 return false; 76 } else { 77 $('.pbl-error').slideUp(250); 78 return true; 79 } 80 } 81 return true; 82 } 83 84})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.