PageSourceSearch

https://salons.nl/wp-content/plugins/mollie-for-listingpro/assets/js/mollie.js?ver=7.1.3

js salons.nl collected 2026-10-08 21:43:27 UTC 7,249 bytes, 189 lines download raw bytes

1jQuery(document).ready(function () {
2    
3    if(jQuery('.mollie-metho-wrap').length) {
4        jQuery('.lp-rightbnk-transfer-msg-new').html(jQuery('.lp-rightbnk-transfer-msg-new').html().replace('Sorry! You have not enable any payment method',''));
5    }
6    
7    jQuery('.lp_payment_step_next.firstStep').click(function () {
8        if(jQuery('#hidePaystackRecurring').length) {
9        } else {
10            jQuery('.lp-checkout-recurring-wrap').show();
11        }
12    });
13    
14    jQuery(document).on('click', 'button.firstStep', function(){
15        jQuery('#listings_checkout_form .inactive-license').closest('.lp-method-wrap').css('display', 'none');
16        jQuery('#listings_checkout_form .invalid-currency').closest('.lp-method-wrap').css('display', 'none');
17    });
18    
19    jQuery(document).on('click', 'button.firstStep, button.secondStep', function(){
20        var payment_method = jQuery('input[name="plan"]:checked').val();
21        if( payment_method == 'mollie' ){
22            //jQuery('.lp-checkout-recurring-wrap input[name="lp-recurring-option"]').prop("checked", false);
23            //jQuery('.lp-checkout-recurring-wrap').css('display', 'none');
24        }
25    });
26    
27    jQuery('#listings_checkout_form').on('submit', function(e){
28        var $this       =   jQuery(this),
29        method          =   $this.find('input[name="plan"]:checked').val(),
30        listing_id      =   $this.find('input[name="listing_id"]:checked').val(),
31        plan_id         =   $this.find('input[name="listing_id"]:checked').data('planid'),
32        paid_amount     =   jQuery('span.lp-subtotal-total-price').data('subtotal'),
33        currency        =   jQuery('input[name=currency]').val(),
34        ajaxurl         =   ajax_search_term_object.ajaxurl;
35        
36        var recurrText  =   'no';
37        if($this.find('input[name="lp-recurring-option"]').is(':checked')) {
38            recurrText  =   'yes';
39        }
40        
41        var coupon_used = '';
42        if($this.find('input[name=coupon-text-field]').length) {
43            coupon_used =   $this.find('input[name=coupon-text-field]').val();
44        }
45        
46        var callFrom = 'listing';
47        if(jQuery('#claimID').length) {
48            callFrom = 'claim';
49        }
50
51        if(method === 'mollie'){
52            jQuery("body").addClass("listingpro-loading");
53            jQuery.ajax({
54                type: "POST",
55                dataType: "json",
56                url: ajaxurl,
57                data: {
58                    "action": "lp_mollie_submit_form",
59                    "listing": listing_id,
60                    "plan": plan_id,
61                    "amount": paid_amount,
62                    "taxrate": $this.find("input[name=listings_tax_price]").val(),
63                    "coupon": coupon_used,
64                    "currency": currency,
65                    "recurring" : recurrText,
66                    'callFrom' : callFrom
67                },
68                success: function(res){
69                    jQuery("body").removeClass("listingpro-loading");
70                    if( res.status == 'error' ){
71                        alert(res.msg);
72                    }else{
73                        window.location.href = res.msg;
74                    }
75                },
76                error: function(errorThrown){
77                    alert(errorThrown);
78                    jQuery("body").removeClass("listingpro-loading");
79                }
80            });
81            return false;
82        }
83    });
84
85    var packages = [];
86    jQuery(document).on('click', 'input[name="lpadsoftype[]"]', function() {
87        if(jQuery(this).is(':checked')){
88            packages.push(jQuery(this).val());
89        }else{
90            var i = packages.indexOf(jQuery(this).val());
91            if(i != -1) {
92                packages.splice(i, 1);
93            }
94        }
95    });
96    
97    jQuery('#lp-new-ad-compaignForm, .lp_campaign_paynow').on('submit', function(e){
98        var $this       = jQuery(this),
99        lpTotalPrice    =   jQuery('input[name="ads_price"]').val(),
100        adsTypeVal      =   jQuery('input[name="adsTypeval"]').val(),
101        adsDays         =   '',
102        taxPrice        =   jQuery('input[name="taxprice"]').val(),
103        listing_id      =   jQuery('select[name="lp_ads_for_listing"]').val(),
104        method          =   jQuery('input[name="method"]:checked').val(),
105        ajaxurl         =   ajax_search_term_object.ajaxurl;
106        
107        var totalPrice  =   lpTotalPrice;
108        if($this.data('type') == 'adsperclick') {
109           totalPrice  =   jQuery('input[name="adsprice_pc"]').val();
110        } 
111        if(jQuery('input[name="ads_days"]').length) {
112            adsDays = jQuery('input[name="ads_days"]').val();
113        }
114        
115        if(method === 'mollie'){
116            jQuery("body").addClass("listingpro-loading");
117            
118            jQuery.ajax({
119                type: "POST",
120                dataType: "json",
121                url: ajaxurl,
122                data: {
123                    "action": "lp_mollie_submit_campaign_form",
124                    "listing": listing_id,
125                    "packages": packages,
126                    "lpTOtalprice":lpTotalPrice,
127                    "adsTypeval":adsTypeVal,
128                    "ads_days":adsDays,
129                    "ads_price":totalPrice,
130                    "taxprice":taxPrice,
131                },
132                success: function(res){
133                    jQuery("body").removeClass("listingpro-loading");
134                    if( res.status == 'error' ){
135                        alert(res.msg);
136                    }else{
137                        window.location.href = res.msg;
138                    }
139                },
140                error: function(errorThrown){
141                    alert(errorThrown);
142                    jQuery("body").removeClass("listingpro-loading");
143                }
144            });
145        }
146        
147        return false;
148    });
149
150});
151
152
153jQuery(document).on('click', 'a.mollie-unsub', function(e){
154    e.preventDefault();
155    var $this = jQuery(this),
156    cMsg   =   $this.data('cmsg');
157    var r = confirm(cMsg);
158    if( r == true ) {
159        jQuery('body').addClass('listingpro-loading');
160        var subscript_id = jQuery(this).attr('href');
161        unsubsribe_mollie(subscript_id, $this);
162    }
163 });
164
165function unsubsribe_mollie(subs_id, $this) {
166
167    var ajaxurl = ajax_search_term_object.ajaxurl;
168    jQuery.ajax({
169        type: "POST",
170        dataType: "json",
171        url: ajaxurl,
172        data: {
173            "action": "lp_unsub_mollie",
174            "sub_id": subs_id,
175            'lpNonce' : jQuery('#lpNonce').val()
176        },
177        success: function(res){
178            jQuery("body").removeClass("listingpro-loading");
179            alert(res.msg);
180            if(res.status=="success"){
181                $this.closest('.lp-listing-outer-container').slideToggle();
182            }
183        },
184        error: function(errorThrown){
185            alert(errorThrown);
186            jQuery("body").removeClass("listingpro-loading");
187        }
188    });
189}

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.