mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:07:32 -05:00 
			
		
		
		
	Fix for Braintree
This commit is contained in:
		
							parent
							
								
									53b1ce7a0f
								
							
						
					
					
						commit
						eb4fceede6
					
				@ -56,16 +56,13 @@
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                onPaymentMethodReceived: function(event) {
 | 
					                onPaymentMethodReceived: function(event) {
 | 
				
			||||||
                    if ($form.find('button').is(':disabled')) {
 | 
					 | 
				
			||||||
                        return false;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    // Disable the submit button to prevent repeated clicks
 | 
					                    // Disable the submit button to prevent repeated clicks
 | 
				
			||||||
                    $form.find('button').prop('disabled', true);
 | 
					                    $form.find('button').prop('disabled', true);
 | 
				
			||||||
                    $('#js-error-message').hide();
 | 
					                    $('#js-error-message').hide();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Insert the token into the form so it gets submitted to the server
 | 
					                    // Insert the token into the form so it gets submitted to the server
 | 
				
			||||||
                    $form.append($('<input type="hidden" name="sourceToken"/>').val(event.nonce));
 | 
					                    $form.append($('<input type="hidden" name="sourceToken"/>').val(event.nonce));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // and submit
 | 
					                    // and submit
 | 
				
			||||||
                    $form.get(0).submit();
 | 
					                    $form.get(0).submit();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user