PageSourceSearch

https://pasc-conference.org/wp-content/plugins/saferpay_woocommerce_gateway/assets/js/main.js?ver=2.1.3

js pasc-conference.org collected 2026-09-24 10:10:50 UTC 5,675 bytes, 141 lines download raw bytes

1/**
2 * Saferpay PaymentService
3 *
4 * NOTICE OF LICENSE
5 *
6 * Once you have purchased the software with PIT Solutions AG / Six Payment services AG
7 * or one of its  authorised resellers and provided that you comply with the conditions of this contract,
8 * PIT Solutions AG and Six Payment services AG grants you a non-exclusive license,
9 * unlimited in time for the usage of the software in the manner of and for the purposes specified in License.txt
10 * available in extension package, according to the subsequent regulations
11 *
12 * DISCLAIMER
13 *
14 * Do not edit or add to this file if you wish to upgrade this extension to
15 * newer versions in the future.
16 *
17 * @category Saferpay
18 * @package Saferpay_PaymentService
19 * @author PIT Solutions Pvt. Ltd.
20 * @copyright Copyright (c) 2020 PIT Solutions AG. (www.pitsolutions.ch) and Six Payment services AG ( https://www.six-payment-services.com/)
21 * @license https://www.webshopextension.com/en/licence-agreement-saferpay
22 *
23 */
24 
25/*  
26 * save card checkbox function on checkout page
27 */
28window.addEventListener('load', (event) => {
29    // PAGE IS FULLY LOADED  
30    // FADE OUT YOUR OVERLAYING DIV
31    jQuery('#ajax-loading-payment').hide();
32})
33jQuery(document).ready(function() {
34    let $ = jQuery;
35    
36    /* remove button from html*/
37    jQuery(".woocommerce-MyAccount-content table a.button.change_payment_method").remove();
38
39    $(document).on("click", ".spgw-common-savecard input:checkbox", function() {
40        if (jQuery(this).not(':checked').length >0) {
41            
42            jQuery(this).parents(".spgw-common-savecard").children('.spgw-saferpay-alias').show();
43            jQuery(this).parents(".spgw-common-savecard").children('.spgw-saferpay-alias').find('select option[value="new"]').attr("selected", "selected");
44        } else {
45           
46            jQuery(this).parents(".spgw-common-savecard").children('.spgw-saferpay-alias').hide();
47            jQuery(this).parents(".spgw-common-savecard").children('.spgw-saferpay-alias').find('select option[value="new"]').attr("selected", "selected");
48        }
49    });
50    jQuery(document).on("change", ".spgw-saferpay-alias select", function() { 
51        if(jQuery('#saferpay-div').length > 0){
52            jQuery(this).parents('.spgw-common-savecard').parent().parent().parent().eq(0).attr('data-select-value', jQuery(this).val());
53        }else{
54            jQuery(this).parents('.spgw-common-savecard').parent().parent().parent().parent().eq(0).attr('data-select-value', jQuery(this).val());
55        }
56        
57       
58        if(jQuery(this).val() == "new"){
59            jQuery('#saferpay-div').show();
60            jQuery('.credit_error').show();
61            if(jQuery('.woocommerce-SavedPaymentMethods-saveNew').length > 0){
62                jQuery(this).parents('.spgw-common-savecard').find('.woocommerce-SavedPaymentMethods-saveNew').show();  
63            }else if(jQuery('.wc-block-components-payment-methods__save-card-info').length > 0){
64                if(jQuery('#saferpay-div').length > 0){
65                    jQuery(this).parents('.spgw-common-savecard').parent().parent().find('.wc-block-components-payment-methods__save-card-info').show();
66                }else{
67                    jQuery(this).parents('.spgw-common-savecard').parent().parent().siblings('.wc-block-components-payment-methods__save-card-info').show();
68                }
69                
70            }
71            
72        }else{
73            jQuery('#saferpay-div').hide();
74            jQuery('.credit_error').hide();
75            if(jQuery('.woocommerce-SavedPaymentMethods-saveNew').length > 0){
76                jQuery(this).parents('.spgw-common-savecard').find('.woocommerce-SavedPaymentMethods-saveNew').hide(); 
77            }else if(jQuery('.wc-block-components-payment-methods__save-card-info').length > 0){
78                if(jQuery('#saferpay-div').length > 0){
79                    jQuery(this).parents('.spgw-common-savecard').parent().parent().find('.wc-block-components-payment-methods__save-card-info').hide();
80                }else{
81                    jQuery(this).parents('.spgw-common-savecard').parent().parent().siblings('.wc-block-components-payment-methods__save-card-info').hide();
82                }
83               
84            }
85            
86        }
87     });
88
89    window.addEventListener('pmIframeEvent', (e) => {
90        
91        let errornotice = {
92                   action: "error_redirect_checkout",
93                    'msg': e.detail.msg,
94                    'type': e.detail.type,
95               };
96          jQuery.ajax({
97                   type:        'POST',
98                   url: e.detail.ajaxurl, 
99                   data:errornotice,
100                   success: function(response) {
101                    window.location.href = e.detail.url;
102                   }
103
104            });
105});
106
107})
108
109/* 
110 * Delete card
111 */
112function confSubmit(form) {
113    Notify.confirm({
114        title: notify.title,
115        html: notify.html,
116        oktext: notify.oktext,
117        canceltext: notify.canceltext,
118        ok: function() {
119            jQuery(".smallLoader").show();
120            form.submit();
121        },
122        cancel: function() {
123            //    Notify.alert('cancel');
124        },
125        focus: function() {
126            //    Notify.alert('focus');
127        }
128    });
129}
130
131function aliasUpdate(form) {
132    jQuery(".validUntil").show();
133    jQuery(form).find(".ExpMonth").show();
134    jQuery(form).find(".ExpYear").show();
135    jQuery(form).find(".aliasEdit").hide();
136    jQuery(form).find(".aliasUpdate").show();
137    jQuery(form).find('.auWrap').slideToggle();
138}
139jQuery('.aliasUpdate').on('click',function() {
140  jQuery(".smallLoader").show();
141});

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.