PageSourceSearch

https://www.epson.cz/_ui/addons/adyenv6b2ccheckoutaddon/responsive/common/js/adyen_billingaddress.js

js epson.cz collected 2026-09-26 10:33:32 UTC 3,443 bytes, 93 lines download raw bytes

1$( document ).ready( function () {
2
3    var spinner = $( "<img src='" + ACC.config.commonResourcePath + "/images/spinner.gif' />" );
4
5    function binduseAdyenDeliveryAddress () {
6        $( '#useAdyenDeliveryAddress' ).on( 'change', function () {
7            if ( $( '#useAdyenDeliveryAddress' ).is( ":checked" ) ) {
8                var options = {'countryIsoCode': $( '#useAdyenDeliveryAddressData' ).data( 'countryisocode' ), 'useAdyenDeliveryAddress': true};
9                enableAddressForm();
10                displayAdyenCreditCardAddressForm( options, onDeliveryAddressToggle );
11                disableAddressForm();
12            } else {
13                clearAddressForm();
14                enableAddressForm();
15            }
16        } );
17
18        if ( $( '#useAdyenDeliveryAddress' ).is( ":checked" ) ) {
19            var options = {'countryIsoCode': $( '#useAdyenDeliveryAddressData' ).data( 'countryisocode' ), 'useAdyenDeliveryAddress': true};
20            enableAddressForm();
21            displayAdyenCreditCardAddressForm( options, onDeliveryAddressToggle );
22            disableAddressForm();
23        }
24    }
25
26    function bindSubmitSilentOrderPostForm () {
27        $( '.submit_silentOrderPostForm' ).click( function () {
28            ACC.common.blockFormAndShowProcessingMessage( $( this ) );
29            $( '.adyenBillingAddressForm' ).filter( ":hidden" ).remove();
30            enableAddressForm();
31            $( '#silentOrderPostForm' ).submit();
32        } );
33    }
34
35    function disableAddressForm () {
36        $( 'input[id^="address\\."]' ).prop( 'disabled', true );
37        $( 'select[id^="address\\."]' ).prop( 'disabled', true );
38    }
39
40    function enableAddressForm () {
41        $( 'input[id^="address\\."]' ).prop( 'disabled', false );
42        $( 'select[id^="address\\."]' ).prop( 'disabled', false );
43    }
44
45    function clearAddressForm () {
46        $( 'input[id^="address\\."]' ).val( "" );
47        $( 'select[id^="address\\."]' ).val( "" );
48    }
49
50    function onDeliveryAddressToggle () {
51        if ( $( '#useAdyenDeliveryAddress' ).is( ":checked" ) ) {
52            $( '#address\\.country' ).val( $( '#useAdyenDeliveryAddressData' ).data( 'countryisocode' ) );
53            disableAddressForm();
54        } else {
55            clearAddressForm();
56            enableAddressForm();
57        }
58    }
59
60    function bindCreditCardAddressForm () {
61        $( '#billingAdyenCountrySelector :input' ).on( "change", function () {
62            var countrySelection = $( this ).val();
63            var options = {
64                'countryIsoCode': countrySelection,
65                'useAdyenDeliveryAddress': false
66            };
67            displayAdyenCreditCardAddressForm( options );
68        } )
69    }
70
71    function displayAdyenCreditCardAddressForm ( options, callback ) {
72        const form = $( "#adyenBillingAddressForm" );
73        $.ajax( {
74            url: ACC.config.encodedContextPath + '/checkout/multi/adyen/select-payment-method/billingaddressform',
75            async: true,
76            data: options,
77            dataType: "html",
78            beforeSend: function () {
79                form.html( spinner );
80            }
81        } ).done( function ( data ) {
82            form.html( data );
83            if ( typeof callback === 'function' ) {
84                callback();
85            }
86        } );
87    }
88
89    binduseAdyenDeliveryAddress();
90    bindSubmitSilentOrderPostForm();
91    bindCreditCardAddressForm();
92
93} );

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.