!!!MAKE BACKUPS OF YOUR FILES *BEFORE* YOU MAKE ANY CHANGES!!!
EDIT: includes/echo_class.php and add the following
ADD AFTER:
var $merchant_name;
var $version;
var $DeclineMesssages;
function EchoPHP() {
$this->LoadDeclineMessages();
}
ADD AFTER:
function get_decline_code() {
return $this->GetEchoProp($this->echotype3, "decline_code");
}
function get_decline_message() {
$code = str_replace('00','',$this->decline_code);
return $this->DeclineMessages[$code];
}
ADD BEFORE:
} // end of class
?>
function LoadDeclineMessages() {
$this->DeclineMessages = array(
'01' => 'The merchant must call the issuer before the transaction can be approved.',
'02' => 'The merchant must call the issuer before the transaction can be approved.',
'03' => 'The merchant ID is not valid.',
'04' => 'The card is listed on the Warning Bulletin. Merchant may receive reward money by capturing the card.',
'05' => 'The transaction was declined without explanation by the card issuer. ',
'06' => 'The card issuer returned an error without further explanation.',
'07' => 'The card is listed on the Warning Bulletin. Merchant may receive reward money by capturing the card.',
'08' => 'Honor with identification.',
'09' => 'Request in progress.',
'10' => 'Approved for partial amount.',
'11' => 'Approved, VIP program. ',
'12' => 'The requested transaction is not supported or is not valid for the card number presented.',
'13' => 'The amount exceeds the limits established by the issuer for this type of transaction.',
'14' => 'The issuer indicates that this card is not valid.',
'15' => 'The card issuer number is not valid.',
'16' => 'Approved, update track 3.',
'17' => 'Customer cancellation.',
'18' => 'Customer dispute.',
'19' => 'Customer should resubmit transaction.',
'20' => 'Invalid response.',
'21' => 'No action taken. The issuer declined with no other explanation.',
'22' => 'Suspected malfunction.',
'23' => 'Unacceptable transaction fee.',
'24' => 'File update not supported.',
'25' => 'Unable to locate record.',
'26' => 'Duplicate record.',
'27' => 'File update edit error.',
'28' => 'File update file locked.',
'29' => 'Not Used',
'30' => 'The host reported that the transaction was not formatted properly.',
'31' => 'Bank not supported by switch.',
'32' => 'Completed partially.',
'33' => 'The card is expired. Merchant may receive reward money by capturing the card.',
'34' => 'The card issuer suspects fraud. Merchant may receive reward money by capturing the card.',
'35' => 'Contact card issuer. Merchant may receive reward money by capturing the card.',
'36' => 'The card is restricted by the issuer. Merchant may receive reward money by capturing the card.',
'37' => 'Contact ECHO security. Merchant may receive reward money by capturing the card.',
'38' => 'PIN attempts exceed issuer limits. Merchant may receive reward money by capturing the card.',
'39' => 'No credit account.',
'40' => 'Requested function not supported.',
'41' => 'The card has been reported lost.',
'42' => 'No universal account.',
'43' => 'The card has been reported stolen.',
'44' => 'No investment account.',
'45' => 'Not Used',
'46' => 'Not Used',
'47' => 'Not Used',
'48' => 'Not Used',
'49' => 'Not Used',
'50' => 'Not Used',
'51' => 'The credit limit for this account has been exceeded.',
'52' => 'Not Used',
'53' => 'Not Used',
'54' => 'The card is expired.',
'55' => 'The cardholder PIN is incorrect.',
'56' => 'No card record.',
'57' => 'The card is not allowed the type of transaction requested.',
'58' => 'The Merchant is not allowed this type of transaction.',
'59' => 'Suspected fraud.',
'60' => 'Contact ECHO.',
'61' => 'The amount exceeds the allowed daily maximum.',
'62' => 'The card has been restricted.',
'63' => 'The card has been restricted.',
'64' => 'Original amount incorrect.',
'65' => 'The allowable number of daily transactions has been exceeded.',
'66' => 'Call acquirer security, call ECHO.',
'67' => 'Not Used',
'68' => 'Response received too late.',
'69' => 'Not Used',
'70' => 'Not Used',
'71' => 'Not Used',
'72' => 'Not Used',
'73' => 'Not Used',
'74' => 'Not Used',
'75' => 'The allowed number of PIN retries has been exceeded.',
'76' => 'The debit account does not exist.',
'77' => 'The credit account does not exist.',
'78' => 'The associated card number account is invalid or does not exist.',
'79' => 'Already reversed.',
'80' => 'Not Used',
'81' => 'Not Used',
'82' => 'Not Used',
'83' => 'Not Used',
'84' => 'The authorization life cycle is invalid.',
'85' => 'Not Used',
'86' => 'Cannot verify PIN.',
'87' => 'Network Unavailable.',
'88' => 'Not Used',
'89' => 'Ineligible to receive financial position information.',
'90' => 'Cut-off in progress.',
'91' => 'The bank is not available to authorize this transaction.',
'92' => 'The transaction cannot be routed to the authorizing agency. ',
'93' => 'Violation of law.',
'94' => 'Duplicate transaction.',
'95' => 'Reconcile error.',
'96' => 'A system error has occurred.',
'97' => 'Not Used',
'98' => 'Exceeds cash limit.');
}
EDIT: includes/modules/payment/echo_cc.php and add the following
REPLACE:
if ($ECHO_ERROR) {
print(MODULE_PAYMENT_ECHO_CC_ERROR);
echo $echoPHP->get_echotype2();
die("");
}
WITH:
if ($ECHO_ERROR) {
$error = MODULE_PAYMENT_ECHO_CC_ERROR.$echoPHP->get_decline_message();
$payment_error_return = 'payment_error=' . $this->code . '&error=' . $error . '&cc_owner=' . urlencode($_POST['cc_owner']) . '&cc_expires_month=' . $_POST['cc_expires_month'] . '&cc_expires_year=' . $_POST['cc_expires_year'];
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
}
EDIT: includes/functions/general.php
REPLACE:
function tep_output_string_protected($string) {
return tep_output_string($string, false, true);
}
WITH:
function tep_output_string_protected($string) {
return tep_output_string($string, false, true,false);
}
ADD AFTER:
function tep_output_string_protected($string) {
return tep_output_string($string, false, true, false);
}
function tep_output_string_protected2($string) {
return tep_output_string($string, false, true, true);
}
REPLACE: (entire function. Dont have original code)
function tep_output_string($string, $translate = false, $protected = false, $allowbrp = false) { .....
...
...
}
WITH:
function tep_output_string($string, $translate = false, $protected = false, $allowbrp = false) {
if ($protected == true) {
$ret = htmlspecialchars($string);
if ($allowbrp == true) {
$ret = str_replace('<br>','<br>',$ret);
$ret = str_replace('<p>','<br>',$ret);
}
return $ret;
} else {
if ($translate == false) {
return tep_parse_input_field_data($string, array('"' => '"'));
} else {
return tep_parse_input_field_data($string, $translate);
}
}
}
EDIT: checkout_payment.php
REPLACE: around 187 dont have original code.
from < tr > to < /tr >
WITH
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
<tr class="infoBoxNoticeContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="mainError" width="100%" valign="top"><?php echo tep_output_string_protected2($error['error']); ?></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
EDIT: stylesheet.css
ADD:
TD.mainError, P.mainError {
font-family: Verdana, Arial, sans-serif;
color: #CC0000;
font-weight: bold;
font-size: 11px;
line-height: 1.5;
}