PageSourceSearch

https://jezykowasilka.pl/wp-content/plugins/woo-payu-payment-gateway/assets/js/payu-gateway.js?ver=2.9.0

js jezykowasilka.pl collected 2026-10-02 17:41:11 UTC 4,119 bytes, 105 lines download raw bytes

1(function ($) {
2    var $form = $('form.checkout');
3
4    $('body').on('click', '.payu-list-banks li.payu-active label', function () {
5        $('.payu-list-banks label').removeClass('active');
6        $(this).addClass('active');
7    });
8
9    $('body').on('click', '.payu-list-banks .payu-active', function () {
10        $('.pbl-error').slideUp(250);
11    });
12
13    $('body').on('click', '.payu-conditions-description .payu-read-more', function () {
14        $(this).next('.payu-more-hidden').show();
15        $(this).remove();
16    });
17
18    $('form#order_review').on('submit', function (e) {
19        var paymentMethod = $(this).find('input[name="payment_method"]:checked').val();
20        var validateResult = true;
21
22        if (paymentMethod === 'payusecureform') {
23            validateResult = validate_payu_secure_form(this);
24        } else if (paymentMethod === 'payulistbanks') {
25            validateResult = validate_payu_list_banks();
26        }
27
28        if (!validateResult) {
29            setTimeout(function () {
30                $(e.target).unblock();
31            }, 500);
32        }
33
34        return validateResult;
35    });
36
37    $form.on('checkout_place_order_payusecureform', function () {
38        return validate_payu_secure_form(this);
39    });
40
41    $form.on('checkout_place_order_payulistbanks', function () {
42        return validate_payu_list_banks();
43    });
44
45    function validate_payu_secure_form(form) {
46        var payuTokenElement = document.getElementsByName('payu_sf_token')[0];
47
48        if (payuTokenElement.value === '') {
49            try {
50                window.payuSdkForms.tokenize()
51                    .then(function (result) {
52                        $('.payu-sf-validation-error, .payu-sf-technical-error')
53                            .html('')
54                            .slideUp(250);
55                        if (result.status === 'SUCCESS') {
56                            payuTokenElement.value = result.body.token;
57                            document.getElementsByName('payu_browser[screenWidth]')[0].value = screen.width;
58                            document.getElementsByName('payu_browser[javaEnabled]')[0].value = navigator.javaEnabled();
59                            document.getElementsByName('payu_browser[timezoneOffset]')[0].value = new Date().getTimezoneOffset();
60                            document.getElementsByName('payu_browser[screenHeight]')[0].value = screen.height;
61                            document.getElementsByName('payu_browser[userAgent]')[0].value = navigator.userAgent;
62                            document.getElementsByName('payu_browser[colorDepth]')[0].value = screen.colorDepth;
63                            document.getElementsByName('payu_browser[language]')[0].value = navigator.language;
64                            $(form).submit();
65                        } else {
66                            $(result.error.messages).each(function (i, error) {
67                                var source = error.source || 'technical';
68                                $('.payu-sf-' + error.type + '-error[data-type="' + source + '"]')
69                                    .html(error.message)
70                                    .slideDown(250);
71                                $('html, body').animate({
72                                    scrollTop: $('.card-container').offset().top
73                                }, 300);
74                            });
75                        }
76                    })
77                    .catch(function (e) {
78                        console.log(e);
79                    });
80            } catch (e) {
81                console.log(e);
82            }
83
84            return false;
85        }
86
87        return true;
88    }
89
90    function validate_payu_list_banks() {
91        if (!$('.payu-list-banks').find('.payu-active .active').length) {
92            $('html, body').animate({
93                scrollTop: $('.payu-list-banks').offset().top
94            }, 300);
95            $('.pbl-error').slideDown(250);
96
97            return false;
98        } else {
99            $('.pbl-error').slideUp(250);
100
101            return true;
102        }
103    }
104
105})(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.