Is it possible to change the message my customers see in the event of certain failing responses? I use paypal pro for the credit card processing but sometimes the credit card issuing bank declines the transaction. I have found out it is usually a security check which they just want to make sure it is the card holder actually making the purchase and the card is not lost/stolen.
When this happens my customer will only see this:
[quote]This transaction cannot be processed.[/quote]
and seeing this does not explain to them why it will not go through.
Is it possible somehow that when this message response comes in from my credit card process I can change it somehow to show something like:
[quote]
The credit card's issuing bank has failed to authorization this transaction.
Please contact the credit card bank to see why the transaction was declined.
[/quote]
I am using the last cs-cart version 2 professional released is this matters. thank you very much!!!
I usually go to Administration, Languages and search for keywords. In your case, maybe search for 'This transaction cannot be processed".
When you find what you are looking for, it's easy enough to change.
I am not running version 2, so I can not try.
It could also be in the php file of whatever payment you're using.
Try to search in admin language variable and change that with what you need.
Tony Birnseth at ez-ms.com used to have an addon to do exactly what you want. Basically instead of just giving a message with no information, his addon would actually tell the customer why their order failed. I believe this addon was for 2.x, but I'm not seeing it on his site anymore.
I'd probably try shooting him a message and see if he still has it.
Thanks,
Brandon
Thank you for the answers!
I think the phrases are coming from Paypal. I searched the language file but those phrases do not exist in there.
I am using the Paypal pro so looking into that file, here it looks like the code that paypal sends back (strange there are so many 'FIXME!!' statements in the coding) :
$post = explode("\n", $paypal_request);
Registry::set('log_cut_data', array('CreditCardType', 'CreditCardNumber', 'ExpMonth', 'ExpYear', 'CVV2', 'StartMonth', 'StartYear'));
list ($headers, $response_data) = fn_https_request('POST', $paypal_url, $post, '', '', 'text/xml', '', $paypal_sslcertpath);
$paypal_response = array();
$paypal_response['reason_text'] = '';
if (strpos($response_data, '
if (preg_match('!]*>([^>]+)!', $response_data, $matches)) {
$paypal_response['reason_text'] = $matches[1];
}
$paypal_response['order_status'] = 'F'; // FIXME. Shouldn't be hardcoded
}
if (strpos($response_data, '
if (preg_match('!]*>([^>]+)!', $response_data, $matches)) {
$paypal_response['reason_text'] = $matches[1];
}
$paypal_response['order_status'] = 'F'; // FIXME. Shouldn't be hardcoded
}
if (preg_match('/([^>]+)<\/TransactionID>/', $response_data, $matches)) {
$paypal_response['transaction_id'] = $matches[1];
$paypal_response['order_status'] = 'P';
}
if (preg_match('!]+>([^>]+)!', $response_data, $matches)) {
$paypal_response['avs_code'] = $matches[1];
if (empty($processor_error['avs'][trim($paypal_response['avs_code'])])) {
$paypal_response['order_status'] = 'F';
$paypal_response['reason_text'] .= 'AVS Verification failed'; // FIXME!!!
}
}
if (preg_match('!]+>([^>]+)!', $response_data, $matches)) {
$paypal_response['cvv_code'] = $matches[1];
if (empty($processor_error['cvv'][trim($paypal_response['cvv_code'])])) {
$paypal_response['order_status'] = 'F';
$paypal_response['reason_text'] .= 'CVV Verification failed'; // FIXME!!!
}
}
if (empty($paypal_response['order_status'])) {
$paypal_response['order_status'] = 'F';
}
if (empty($paypal_response['reason_text'])) {
$paypal_response['reason_text'] = '';
}
$pp_response = array();
$pp_response['order_status'] = $paypal_response['order_status'];
$pp_response['reason_text'] = $paypal_response['reason_text'];
$pp_response['transaction_id'] = (!empty($paypal_response['transaction_id'])) ? $paypal_response['transaction_id'] : '';
$pp_response['descr_avs'] = (!empty($paypal_response['avs_code'])) ? $processor_error['avs'][$paypal_response['avs_code']] : '';
$pp_response['descr_cvv'] = (!empty($paypal_response['cvv_code'])) ? $processor_error['cvv'][$paypal_response['cvv_code']] : '';
} // if (defined('DO_DIRECT_PAYMENT'))
if (!empty($_SESSION['cmpi']['auth_error'])) {
$pp_response['order_status'] = 'F';
$pp_response['reason_text'] = (isset($pp_response['reason_text']) ? $pp_response['reason_text'] . "\n" : '') . '3DSecure authentication failed';
}
if (isset($_SESSION['cmpi']['err_desc']) && is_array($_SESSION['cmpi']['err_desc'])) {
$transaction_id = !empty($_SESSION['cmpi']['transaction_id']) ? $_SESSION['cmpi']['transaction_id'] : '';
foreach ($_SESSION['cmpi']['err_desc'] as $k => $desc) {
if ($desc) {
$pp_response['reason_text'] = (isset($pp_response['reason_text']) ? $pp_response['reason_text'] . "\n" : '') . '3DSecure error: ' . $_SESSION['cmpi']['err_no'][$k] . ': ' . $desc;
if ($transaction_id) {
$pp_response['reason_text'] .= ' (Transaction ID: ' . $transaction_id . ')';
}
}
}
}
Trying to figure it out but it looks to me like this line is meaning the 'F' would me failed?:
$paypal_response['order_status'] = 'F'; // FIXME. Shouldn't be hardcoded
I will have to mess around with these as what I am looking must be able to be done in this file.