AnonSec Shell
Server IP : 172.67.157.199  /  Your IP : 3.15.148.252   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/gravityforms/includes/addon/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/gravityforms/includes/addon/js/gaddon_token.js
window.GFToken = null;

( function( $ ) {
	
	GFToken = function( args ) {
		
		for ( var prop in args ) {
			if ( args.hasOwnProperty( prop ) )
				this[prop] = args[prop];
		}
		
		this.form = $( '#gform_' + this.formId );

		this.init = function() {
		
			var GFTokenObj = this;
			
			this.tokens = {};

			/* Initialize spinner. */
			if ( ! this.isAjax )
				gformInitSpinner( this.formId );

			/* If multipage form, run on gform_page_loaded. */
			if ( this.hasPages ) {

				$( document ).bind( 'gform_page_loaded', function( event, form_id, current_page ) {
				
					if ( form_id != GFTokenObj.formId)
						return;
					
					if ( current_page != GFTokenObj.pageCount)
						GFTokenObj.saveEntryData();
			
				} );

			}
			
			this.form.submit( function() {
				GFTokenObj.onSubmit();
			} );
			
		};

		this.onSubmit = function() {

			if ( this.form.data('gftokensubmitting') ) {
				return;
			} else {
				event.preventDefault();
				this.form.data( 'gftokensubmitting', true );
			}

			this.saveEntryData();
			this.processTokens();

		}
		
		this.processTokens = function() {
			
			/* Process feeds. */
			for ( var feed_id in this.feeds ) {
				
				this.active_feed = this.feeds[feed_id];
				
				/* Create new feed object so we can store the billing information. */
				var feed = {
					'billing_fields': {},
					'id': this.active_feed.id,
					'name': this.active_feed.name
				};
				
				/* Add billing information to feed object. */
				for ( var billing_field in this.active_feed.billing_fields ) {
					
					field_id = this.active_feed.billing_fields[ billing_field ];
					feed.billing_fields[ billing_field ] = this.entry_data[ field_id ];
					
				}
				
				/* Get credit card token response. */
				window[ this.callback ].createToken( feed, this );
				
			}
			
		}

		this.saveEntryData = function() {
			
			var GFPaymentObj = this,
				input_prefix = 'input_' + this.formId + '_';
				
			if ( ! this.entry_data )
				this.entry_data = {};
			
			this.form.find( 'input[id^="' + input_prefix + '"], select[id^="' + input_prefix + '"], textarea[id^="' + input_prefix + '"]' ).each( function() {
				
				var input_id = $( this ).attr( 'id' ).replace( input_prefix, '' ).replace( '_', '.' ); 
				
				if ( $.inArray( input_id, GFPaymentObj.fields ) >= 0 )				
					GFPaymentObj.entry_data[ input_id ] = $( this ).val();
				
			} );
		
		}
		
		this.saveToken = function( token ) {
			
			/* Add token response to tokens array. */
			this.tokens[ this.active_feed.id ] = {
				'feed_id': this.active_feed.id,
				'response': token
			};
			
			if ( this.tokens.length == this.feeds.length ) {
				
				/* Add tokens to form. */
				this.form.find( this.responseField ).val( $.toJSON( this.tokens ) );
				
				/* Submit the form. */
				this.form.submit();
				
			}
			
		}

		this.init();
		
	}
	
} )( jQuery );

Anon7 - 2022
AnonSec Team