PageSourceSearch

https://factumfoundation.org/wp-content/plugins/pago-redsys-tpv-gr…/pago-redsys-grafreak-public.js?ver=1.0.0

js factumfoundation.org collected 2026-09-24 18:53:34 UTC 3,494 bytes, 83 lines download raw bytes

1/**
2 * All of the code for your public-facing JavaScript source
3 * should reside in this file.
4 *
5 * @link       http://www.grafreak.net
6 * @since      1.0.0
7 *
8 * @package    Pago_Redsys_Grafreak
9 * @subpackage Pago_Redsys_Grafreak/public/js
10 */
11
12(function( $ ) {
13    'use strict';
14
15    $( document ).ready(
16        function() {
17            $( 'input#amountTPV' ).keydown(
18                function(e) {
19                    if (e.keyCode === 190) {
20                        e.preventDefault();
21                    }
22                }
23            );
24            $( 'input#amountTPV,input#orderNumber' ).focus(
25                function(){
26                    $( '.tpv-plugin-codigo-pedido span' ).removeClass( 'show' );
27                    $( '.tpv-plugin-cantidad-pagar span' ).removeClass( 'show' );
28                    $( this ).removeClass( 'warning' );
29                }
30            );
31            $( '#form_tpv_submit' ).click(
32                function(e) {
33                    e.preventDefault();
34                    var error = false;
35                    if ($( 'input#amountTPV' ).val() == '' || $( 'input#amountTPV' ).val() == 0) {
36                        $( '.tpv-plugin-cantidad-pagar span' ).addClass( 'show' );
37                        $( 'input#amountTPV' ).addClass( 'warning' );
38                        error = true;
39                    }
40                    if ($( 'input#orderNumber' ).val().length < 4 || $( 'input#orderNumber' ).val().length > 8) {
41                        $( '.tpv-plugin-codigo-pedido span' ).addClass( 'show' );
42                        $( 'input#orderNumber' ).addClass( 'warning' );
43                        error = true;
44                    }
45                    if ($( 'input#orderDesc' ).val().length < 0 || $( 'input#orderDesc' ).val().length > 125) {
46                        $( '.tpv-plugin-desc-pedido span' ).addClass( 'show' );
47                        $( 'input#orderDesc' ).addClass( 'warning' );
48                        error = true;
49                    }
50                    if ( ! error) {
51                        $( '.table-form-tpv' ).addClass( 'loading' );
52                        var data = {
53                            action: 'pago_tpv_ajax',
54                            c: $( 'input#amountTPV' ).val().replace(/,/g, '.'),
55                            np: $( 'input#orderNumber' ).val(),
56                            desc: $( 'input#orderDesc' ).val(),
57                            noncesecure: $( 'input#nonce_secure' ).val()
58                        };
59                        if ( $( '.plugin-form-tpv input#url_ok' ).length > 0 ) {
60                            data.url_ok = $( '.plugin-form-tpv input#url_ok' ).val();
61                        }
62                        if ( $( '.plugin-form-tpv input#url_ok' ).length > 0 ) {
63                            data.url_ko = $( '.plugin-form-tpv input#url_ko' ).val();
64                        }
65                        $.post(
66                            the_ajax_script.ajaxurl,
67                            data,
68                            function(response) {
69                                $( 'div.form_tpv' ).html( response );
70                                $( '.table-form-tpv' ).removeClass( 'loading' );
71                                $( '#form_tpv' ).submit();
72                                return true;
73                            }
74                        );
75                    }
76                    return false;
77
78                }
79            );
80        }
81    );
82
83})( 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.