Source/SimpleTransaction.php
protected function checkRequired()
    {
        $missing = array();
        foreach ($this->validFields as $field => $params) {
            if (isset($params['required']) && $params['required']) {
                if ($params['type'] == "single") {
                    if (!isset($this->formData[$field])) {
                        $missing[] = $field;
                        $this->errorMessage[] = 'Missing field: ' . $field;
                    }
                } elseif ($params['type'] == "product") {
                    foreach ($this->products as $prod) {
                        $paramName = $params['paramName'];
                        if (!isset($prod[$paramName])) {
                            $missing[] = $field;
                            $this->errorMessage[] = 'Missing field: ' . $field;
                        }
                    }
                }
            }
        }
        $this->missing = $missing;
        return true;
    }
protected function checkRequired()
    {
        $missing = array();
        foreach ($this->validFields as $field => $params) {
            if (isset($params['required']) && $params['required']) {
                if ($params['type'] == "single") {
                    if (!isset($this->formData[$field])) {
                        $missing[] = $field;
                        $this->errorMessage[] = 'Missing field: ' . $field;
                    }
                } elseif ($params['type'] == "product") {
                    foreach ($this->products as $prod) {
                        $paramName = $params['paramName'];
                        if (!isset($prod[$paramName])) {
                            $missing[] = $field;
                            $this->errorMessage[] = 'Missing field: ' . $field;
                        }
                    }
                }
            }
        }
        $this->missing = $missing;
        return true;
    }
protected function checkRequired ( ) { $ missing = array ( ) ; foreach ( $ this -> validFields as $ field => $ params ) { if ( isset ( $ params [ 'required' ] ) && $ params [ 'required' ] ) { if ( $ params [ 'type' ] == "single" ) { if ( ! isset ( $ this -> formData [ $ field ] ) ) { $ missing [ ] = $ field ; $ this -> errorMessage [ ] = 'Missing field: ' . $ field ; } } elseif ( $ params [ 'type' ] == "product" ) { foreach ( $ this -> products as $ prod ) { $ paramName = $ params [ 'paramName' ] ; if ( ! isset ( $ prod [ $ paramName ] ) ) { $ missing [ ] = $ field ; $ this -> errorMessage [ ] = 'Missing field: ' . $ field ; } } } } } $ this -> missing = $ missing ; return true ; }
Checks if all required fields are set.
Returns true or the array of missing fields list

@return boolean
Checks if all required fields are set . Returns true or the array of missing fields list