Details
- 
        Type:
 Bug
            
         - 
        Status: Closed
 - 
            Priority:
 Critical
                
             - 
            Resolution: Fixed
 - 
            Affects Version/s: 4.0.0-b4
 - 
            Fix Version/s: 4.0.0-b5
 - 
            Component/s: Client Interface
 - 
            Labels:None
 
Description
When clients pay via ACH, entering a new account number and selecting another field collapses the section.
I believe the issue is with the name of the field "account" and the following javascript that is embedded toward the bottom of the page:
$('#account, #details').on('change', function() {
	$('#pay_with').val($(this).attr('id'));
	$('.gateway').prop('checked', false);
			
	if ($(this).attr('id') == 'details') {
		if ($(this).val() == 'cc' || $(this).val() == 'ach') {
			$('#payment_details').show();
			togglePayDetails($(this).val());
			
			$('html,body').animate({scrollTop: $('#payment_details').offset().top}, 'slow');
		}
		else
			$('#payment_details').hide();
			
		$('#account').val('');
	}
	else {
		$('#payment_details, #payment_details_cc, #payment_details_ach').hide();
		$('#details').val('');
	}
});
		
$('.gateway').on('change', function() {
	$('#pay_with').val($(this).val());
	$('#payment_details, #payment_details_cc, #payment_details_ach').hide();
	$('#account, #details').val('');
});
...
Activity
| Field | Original Value | New Value | 
|---|---|---|
| Attachment | capture-for-jira-screenshot-20161212-134544-521.png [ 11621 ] | 
| Assignee | Tyson Phillips [ tyson ] | Jonathan Reissmueller [ jonathan ] | 
            
        
            Automated transition triggered when Jonathan Reissmueller created a branch in Stash  - 
            | Status | Open [ 1 ] | In Progress [ 3 ] | 
            
        
            Automated transition triggered when Jonathan Reissmueller created pull request #210 in Stash  - 
            | Status | In Progress [ 3 ] | In Review [ 5 ] | 
| Resolution | Fixed [ 1 ] | 
| Description | 
                                                                When clients pay via ACH, entering a new account number and selecting another field collapses the section. I believe the issue is with the name of the field "account" and the following javascript that is embedded toward the bottom of the page: $('#account, #details').on('change', function() { $('#pay_with').val($(this).attr('id')); $('.gateway').prop('checked', false); if ($(this).attr('id') == 'details') { if ($(this).val() == 'cc' || $(this).val() == 'ach') { $('#payment_details').show(); togglePayDetails($(this).val()); $('html,body').animate({scrollTop: $('#payment_details').offset().top}, 'slow'); } else $('#payment_details').hide(); $('#account').val(''); } else { $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#details').val(''); } }); $('.gateway').on('change', function() { $('#pay_with').val($(this).val()); $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#account, #details').val(''); });  | 
                
                                                               When clients pay via ACH, entering a new account number and selecting another field collapses the section.
 I believe the issue is with the name of the field "account" and the following javascript that is embedded toward the bottom of the page: {code} $('#account, #details').on('change', function() { $('#pay_with').val($(this).attr('id')); $('.gateway').prop('checked', false); if ($(this).attr('id') == 'details') { if ($(this).val() == 'cc' || $(this).val() == 'ach') { $('#payment_details').show(); togglePayDetails($(this).val()); $('html,body').animate({scrollTop: $('#payment_details').offset().top}, 'slow'); } else $('#payment_details').hide(); $('#account').val(''); } else { $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#details').val(''); } }); $('.gateway').on('change', function() { $('#pay_with').val($(this).val()); $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#account, #details').val(''); }); ... {code}  | 
                
| Description | 
                                                                When clients pay via ACH, entering a new account number and selecting another field collapses the section.
 I believe the issue is with the name of the field "account" and the following javascript that is embedded toward the bottom of the page: {code} $('#account, #details').on('change', function() { $('#pay_with').val($(this).attr('id')); $('.gateway').prop('checked', false); if ($(this).attr('id') == 'details') { if ($(this).val() == 'cc' || $(this).val() == 'ach') { $('#payment_details').show(); togglePayDetails($(this).val()); $('html,body').animate({scrollTop: $('#payment_details').offset().top}, 'slow'); } else $('#payment_details').hide(); $('#account').val(''); } else { $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#details').val(''); } }); $('.gateway').on('change', function() { $('#pay_with').val($(this).val()); $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#account, #details').val(''); }); ... {code}  | 
                
                                                               When clients pay via ACH, entering a new account number and selecting another field collapses the section.
 I believe the issue is with the name of the field "account" and the following javascript that is embedded toward the bottom of the page: {code} $('#account, #details').on('change', function() { $('#pay_with').val($(this).attr('id')); $('.gateway').prop('checked', false); if ($(this).attr('id') == 'details') { if ($(this).val() == 'cc' || $(this).val() == 'ach') { $('#payment_details').show(); togglePayDetails($(this).val()); $('html,body').animate({scrollTop: $('#payment_details').offset().top}, 'slow'); } else $('#payment_details').hide(); $('#account').val(''); } else { $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#details').val(''); } }); $('.gateway').on('change', function() { $('#pay_with').val($(this).val()); $('#payment_details, #payment_details_cc, #payment_details_ach').hide(); $('#account, #details').val(''); }); ... {code}  | 
                
| Sprint | 4.0.0 Sprint 17 [ 35 ] | 
| Rank | Ranked higher | 
            
        
            Automated transition triggered when Tyson Phillips (Inactive) merged pull request #210 in Stash  - 
            | Status | In Review [ 5 ] | Closed [ 6 ] | 
Originally reported at https://www.blesta.com/forums/index.php?/topic/8200-authorizenet-ach/