/**** Function javascript_validation******/
/**** Added missing } in the end******/
/**** FILE: catalog->modules->payment->psigate_xml.php *****/
/**** Find replace function below ****/

function javascript_validation() {
$js = ' if (payment_value == "' . $this->code . '") {' . "n" .
' var cc_owner = document.checkout_payment.psigate_xml_cc_owner.val ue;' . "n" .
' var cc_number = document.checkout_payment.psigate_xml_cc_number.va lue;' . "n";
$js .= ' if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "n" .
' error_message = error_message + "' . MODULE_PAYMENT_PSIGATE_XML_TEXT_JS_CC_OWNER . '";' . "n" .
' error = 1;' . "n" .
' }' . "n" .
' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "n" .
' error_message = error_message + "' . MODULE_PAYMENT_PSIGATE_XML_TEXT_JS_CC_NUMBER . '";' . "n" .
' error = 1;' . "n" .
' }' . "n" .
' }' . "n"; /** Added missing bracket, make sure ; (semicolon) above is changed to . (dot)**/
return $js;
}

/**** Function get_process******/
/**** Added tep_db_prepare_input statement to fields that can create error in mysql******/
/**** FILE: catalog->modules->payment->psigate_xml.php *****/
/**** Find replace below code ****/

1) Find
$Psi_ErrMsg = $psi->getTrxnErrMsg();

Replace with
$Psi_ErrMsg = tep_db_prepare_input($psi->getTrxnErrMsg());

2) Find
$Psi_IPRegion = $psi->getTrxnIPRegion();

Replace with
$Psi_IPRegion = tep_db_prepare_input($psi->getTrxnIPRegion()); /* fix for regions with ' in the name */

3) Find
$Psi_IPCity = $psi->getTrxnIPCity(); /* fix for city with ' in the name */

Replace with
$Psi_IPCity = tep_db_prepare_input($psi->getTrxnIPCity());

More...