someone is trying to develop a payment module for their gateway. I really don't think they are going about it the right way but they have never done zen cart work before.

The big stumper is that this customer has the terms / conditions that has to be accepted. So if you check that box and put in the cc info, the screen just refreshes and tells you to accept the terms.

So I believe that there is javascript conflict with the payment module unchecking the terms and conditions box.

It looks like to me that zen cart is checking that with:

function methodSelect(theMethod) {
if (document.getElementById(theMethod)) {
document.getElementById(theMethod).checked = 'checked';
}
}

Here's is the javascript validation from their payment module if someone would like to look to see if they can see anything that might conflict. I really don't know javascript well enough to figure this out by myself.

PHP Code:
function javascript_validation() {
        if (!isset(
$_GET['error'])) {
            print(
'<input type="hidden" id="form_url" value="' $this->get_post_url() . '" />');
        }

        
$js '<script language="javascript" type="text/javascript" >' "\n";
        
$js .= 'function check_input(type) {' "\n";
        
$js .= 'if (type == "cc") {' "\n";
        
$js .= 'document.getElementById("billing-account-name").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-account-number").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-routing-number").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-account-type").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-entity-type").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-first-name").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-last-name").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-cc-number").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-cc-exp").removeAttribute("disabled");' "\n";
        if (
MODULE_PAYMENT_GPS_USE_CVV == 'True') {
            
$js .= 'document.getElementById("billing-cvv").removeAttribute("disabled");' "\n";
        }
        
$js .= '} else {' "\n";
        
$js .= 'document.getElementById("billing-account-name").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-account-number").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-routing-number").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-account-type").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-entity-type").removeAttribute("disabled");' "\n";
        
$js .= 'document.getElementById("billing-first-name").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-last-name").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-cc-number").setAttribute("disabled", "disabled");' "\n";
        
$js .= 'document.getElementById("billing-cc-exp").setAttribute("disabled", "disabled");' "\n";
        if (
MODULE_PAYMENT_GPS_USE_CVV == 'True') {
            
$js .= 'document.getElementById("billing-cvv").setAttribute("disabled", "disabled");' "\n";
        }
        
$js .= '}' "\n" '}' "\n" .'</script>' "\n";
        print(
$js);

        unset(
$js);
        
$js 'var rbl = document.getElementsByName("payment");' "\n";
        
$js .= 'if (rbl.length > 1) {' "\n";
        
$js .= 'for (var x = 0; x < rbl.length; x++) {' "\n";
        
$js .= 'if (rbl[x].checked && rbl[x].value == "' $this->code '") {' "\n";
        
$js .= 'document.checkout_payment.action = document.getElementById("form_url").value;' "\n";
        
$js .= '}}' "\n" .'} else {' "\n" 'document.checkout_payment.action = document.getElementById("form_url").value;' "\n" '}';

        
$js .= 'if (payment_value == "'$this->code .'") {' "\n";
        if (
MODULE_PAYMENT_GPS_CC_PROCESSING == 'True') {
            
$js .= 'if (document.getElementById("billing-cc-number").getAttribute("disabled") != "disabled") {' "\n";
            
$js .= 'var cc_num = document.getElementById("billing-cc-number").value;' "\n";
            
$js .= 'if (cc_num == "" || cc_num.length < ' CC_NUMBER_MIN_LENGTH ' || cc_num.match(/\D/)) {' "\n";
            
$js .= 'error_message = error_message + "' MODULE_PAYMENT_GPS_TEXT_JS_CC_NUMBER '";' "\n";
            
$js .= 'error = 1;' "\n";
            
$js .= '}' "\n";
            if (
MODULE_PAYMENT_GPS_USE_CVV == 'True') {
                
$js .= 'var cvv = document.getElementById("billing-cvv").value;' "\n";
                
$js .= 'if (cvv == "" || cvv.length < "3" || cvv.length > "4" || cvv.match(/\D/)) {' "\n";
                
$js .= 'error_message = error_message + "' MODULE_PAYMENT_GPS_TEXT_JS_CC_CVV '";' "\n";
                
$js .= 'error = 1; }' "\n";
            }
            
$js .= '}' "\n";
        }
        if (
MODULE_PAYMENT_GPS_CK_PROCESSING == 'True') {
            
$js .= 'if (document.getElementById("billing-account-number").getAttribute("disabled") != "disabled") {' "\n";
            
$js .= 'var account_num = document.getElementById("billing-account-number").value;' "\n";
            
$js .= 'var routing_num = document.getElementById("billing-routing-number").value;' "\n";
            
$js .= 'if (account_num == "" || account_num.length > 17 || account_num.match(/\D/)) {' "\n";
            
$js .= 'error_message = error_message + "' MODULE_PAYMENT_GPS_TEXT_JS_CK_NUMBER '";' "\n";
            
$js .= 'error = 1;' "\n";
            
$js .= '}' "\n";
            
$js .= 'if (routing_num == "" || routing_num.length < 6 || routing_num.match(/\D/)) {' ."\n";
            
$js .= 'error_message = error_message + "' MODULE_PAYMENT_GPS_TEXT_JS_CK_ROUTING_NUMBER '";' "\n";
            
$js .= 'error = 1;' "\n";
            
$js .= '}' "\n";

            
$js .= '}' "\n";
        }
        
$js .= '}' "\n";
    return 
$js;
  }