PageSourceSearch

https://www.hermosa.co.il/wp-content/plugins/meshulam-payment-gate…/js/meshulam_payment_popup.js?ver=7.5

js hermosa.co.il collected 2026-10-08 14:52:04 UTC 5,763 bytes, 117 lines download raw bytes

1jQuery(function($) {
2    if (typeof wc_checkout_params === 'undefined')
3        return false;
4
5    $(document.body).on("click", ".close_popup_meshulam", function(evt) {
6        $('.popup_overlay_meshulam').remove();
7    });
8    $(document.body).on("click", "#place_order", function(evt) {
9        var payment_method = jQuery('form[name="checkout"] input[name="payment_method"]:checked').val();
10        var Form = $(this).parents('form.checkout');
11        $(".woocommerce-error").remove();
12        if (payment_method == 'bitpay-payment' || payment_method == 'meshulam-payment' || payment_method == 'apple-payment' || payment_method == 'cal-payment' || payment_method == 'googlepay-payment') {
13            evt.preventDefault();
14            $('.main_meshulam_loader').show();
15            $.ajax({
16                type: 'POST',
17                url: '?wc-ajax=checkout',
18                dataType: 'json',
19                data: Form.serializeArray(),
20                success: function(response) {
21                    // console.log(response);
22                    if (response.result == 'failure') {
23                        $('.main_meshulam_loader').hide();
24                        $( '.woocommerce-error, .woocommerce-message, .woocommerce-info' ).remove();
25                        $('.woocommerce-notices-wrapper:first').prepend(response.messages);
26                        $( document.body ).trigger( 'wc_notices_refreshed' );
27                        $("html, body").animate({ scrollTop: 0 }, "slow");
28                    }
29                    if (response.result == 'success') {
30                        var red_url = response.redirect;
31                        var order_id = response.order_id;
32                        var action = 'meshulam_popup_payment_iframe';
33                        $.ajax({
34                            type: 'POST',
35                            url: wc_checkout_params.ajax_url,
36                            dataType: 'html',
37                            data: { order_id: order_id, action: action },
38                            success: function(result) {
39                                $('.main_meshulam_loader').hide();
40                                if (result == 'false') {
41                                    window.location.href = red_url;
42                                }
43                                if(payment_method == 'apple-payment'){
44                                    window.location.href = result;
45                                    return;
46                                }
47                                $('body').append(result);
48                                $(".close_popup_meshulam").fadeIn(6000);
49                            },
50                            error: function(error) {
51                                $('.main_meshulam_loader').hide();
52                                console.log(error); // For testing (to be removed)
53                            }
54                        });
55                    }
56
57                },
58                error: function(error) {
59                    $('.main_meshulam_loader').hide();
60                    console.log(error); // For testing (to be removed)
61                }
62            });
63        }
64        if (payment_method == 'grow-wallet-payment') {
65            evt.preventDefault();
66            $('.main_meshulam_loader').show();
67            $.ajax({
68                type: 'POST',
69                url: '?wc-ajax=checkout',
70                dataType: 'json',
71                data: Form.serializeArray(),
72                success: function(response) {
73                    // console.log(response);
74                    if (response.result == 'failure') {
75                        $('.main_meshulam_loader').hide();
76                        $( '.woocommerce-error, .woocommerce-message, .woocommerce-info' ).remove();
77                        $('.woocommerce-notices-wrapper:first').prepend(response.messages);
78                        $( document.body ).trigger( 'wc_notices_refreshed' );
79                        $("html, body").animate({ scrollTop: 0 }, "slow");
80                    }
81                    if (response.result == 'success') {
82                        var red_url = response.redirect;
83                        var order_id = response.order_id;
84                        var action = 'meshulam_grow_wallet_iframe';
85                        $.ajax({
86                            type: 'POST',
87                            url: wc_checkout_params.ajax_url,
88                            dataType: 'json',
89                            data: { order_id: order_id, action: action },
90                            success: function(result) {
91                                // console.log(result);
92                                $('.main_meshulam_loader').hide();
93                                if (result == 'false') {
94                                    window.location.href = red_url;
95                                }
96                                else{
97                                    growPayment.renderPaymentOptions(result.token);
98                                    redirect = result.thank_you_url;
99                                }
100                                $(".close_popup_meshulam").fadeIn(6000);
101                            },
102                            error: function(error) {
103                                $('.main_meshulam_loader').hide();
104                                console.log(error); // For testing (to be removed)
105                            }
106                        });
107                    }
108
109                },
110                error: function(error) {
111                    $('.main_meshulam_loader').hide();
112                    console.log(error); // For testing (to be removed)
113                }
114            });
115        }
116    });
117});

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.