From e999009f3512fd1b4a6eb8defca981846e3c5107 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Mon, 23 Jan 2017 12:14:38 -0500 Subject: [PATCH] generalize CC "invalid data" message It appears that trustcommerce likes to say that the error is due to an invalid CVV, even if it is an error with the date. I've generalized the error message so that users will be less confused when they enter incorrect information. --- trustcommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trustcommerce.php b/trustcommerce.php index 378d13e..0395f24 100644 --- a/trustcommerce.php +++ b/trustcommerce.php @@ -499,7 +499,7 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { return self::error(9009, "Your transaction was declined for address verification reasons. If your address was correct please contact us at donate@fsf.org before attempting to retry your transaction."); break; } - return self::error(9009, "Your transaction was declined: {$reply['declinetype']}"); + return self::error(9009, "Your transaction was declined. Please check the correctness of your credit card information, including CC number, expiration date and CVV code."); break; case self::AUTH_BADDATA: // TODO FIXME do something with $reply['error'] and $reply['offender'] -- 2.25.1