From da1932b61435a07fbb35e83ef73c187f462ada6f Mon Sep 17 00:00:00 2001 From: Lisa Marie Maginnis Date: Thu, 4 Dec 2014 17:43:19 -0500 Subject: [PATCH] added special error for avs failures --- trustcommerce.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trustcommerce.php b/trustcommerce.php index afa2b0d..af51eaf 100644 --- a/trustcommerce.php +++ b/trustcommerce.php @@ -276,6 +276,11 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { // TODO FIXME be more or less specific? // declinetype can be: decline, avs, cvv, call, expiredcard, carderror, authexpired, fraud, blacklist, velocity // See TC documentation for more info + switch($reply['declinetype']) { + case 'avs': + return self::error(9009, "Your transaction was declined for address verification reasons. If your address was correct please contract us at donate@fsf.org before attempting to retry your transaction."); + break; + } return self::error(9009, "Your transaction was declined: {$reply['declinetype']}"); break; case self::AUTH_BADDATA: -- 2.25.1