PageSourceSearch

https://monkey-donkey.es/wp-content/plugins/contact-form-7-redsys-addon/assets/redirect.js?ver=1790242756

js monkey-donkey.es collected 2026-09-24 10:15:26 UTC 3,322 bytes, 85 lines download raw bytes

1jQuery(document).ready( function( $ ) {
2	document.addEventListener( 'wpcf7mailsent', function( event ) {	
3        const isFile = input => 'File' in window && input instanceof File;
4        const isBlob = input => 'Blob' in window && input instanceof Blob;
5
6		var timestamp = Date.now();
7        
8		var files = event.detail.inputs.filter(function(element, index, arr){ 
9            return isFile( element.value ) || isBlob( element.value );
10        });
11		
12		var inputs = event.detail.inputs.filter(function(element, index, arr){ 
13            return !isFile( element.value ) && !isBlob( element.value );
14        });
15
16        var selects_texts = [];
17        $( '#' + event.detail.unitTag + ' form select option:selected' ).each(function() {
18            selects_texts.push( { name: $( this ).parent().attr( 'name' ), value: $( this )[0].innerText } );
19        });
20
21        $( '#' + event.detail.unitTag + ' form input[type=radio]:checked' ).each(function() {
22            selects_texts.push( { name: $( this ).attr( 'name' ), value: jQuery( this ).next().text() } );
23        });
24
25        $( '#' + event.detail.unitTag + ' form input[type=checkbox]:checked' ).each(function() {
26            selects_texts.push( { name: $( this ).attr( 'name' ), value: jQuery( this ).next().text() } );
27        });
28
29        var vacios = [];
30        $( '#' + event.detail.unitTag + ' form select option:not(:selected)' ).each(function() {
31            vacios.push( $( this ).attr( 'name' ) );
32        });
33
34        $( '#' + event.detail.unitTag + ' form input[type=radio]:not(:checked)' ).each(function() {
35            vacios.push( $( this ).attr( 'name' ) );
36        });
37
38        $( '#' + event.detail.unitTag + ' form input[type=checkbox]:not(:checked)' ).each(function() {
39            vacios.push( $( this ).attr( 'name' ) );
40        });
41		
42		formData = new FormData();
43
44		for (let i = 0; i < files.length; i++) {
45			formData.append( files[i].name, files[i].value )
46		}
47		
48		formData.append( 'action', 'cra_check_redsys' );
49		formData.append( 'form_id', event.detail.contactFormId );
50		formData.append( 'inputs', JSON.stringify( inputs ) );
51		formData.append( 'selects_texts', JSON.stringify( selects_texts ) );
52		formData.append( 'vacios', JSON.stringify( vacios ) );
53		formData.append( 'timestamp', timestamp );
54		formData.append( 'nonce', cra_object.nonce );	
55
56        $.ajax({
57			url: cra_object.ajax_url,
58			type:"POST",
59			contentType: 'multipart/form-data',
60			mimeType: 'multipart/form-data',
61			data: formData,
62			contentType: false,
63			processData: false,
64			dataType:"json",
65			success: function( response ){
66				if( response == '0' )
67					return;
68
69				document.location.href = cra_object.ajax_url + "?action=cra_redsys_payment&form_id=" + event.detail.contactFormId 
70																						+ "&descripcion_pasarela=" + response.descripcion_pasarela
71																						+ "&nombre=" + response.nombre 
72																						+ "&email=" + response.email 
73																						+ "&precio=" + response.precio
74																						+ "&perfil=" + response.perfil 
75																						+ "&nonce=" + cra_object.nonce 
76																						+ "&timestamp=" + timestamp;
77			},
78			error: function( jqXHR, textStatus, errorThrown ){
79				console.log( jqXHR );
80				console.log( textStatus );
81				console.log( errorThrown );
82			}
83		})
84	} );
85});

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.