Changed comments to reflect new scope. Added offenders to output for baddata.
[trustcommerce.git] / trustcommerce.php
index bd01c13d69042325ebd5c85039315c48057c2b1b..46cc3d8bf90b76b6c18266f5f6b9a4937e4046d8 100644 (file)
@@ -188,11 +188,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
-      return self::error(9009, "Your transaction was declined: {$result['declinetype']}");
+      return self::error(9009, "Your transaction was declined: {$reply['declinetype']}");
       break;
     case self::AUTH_BADDATA:
-      // TODO FIXME do something with $result['error'] and $result['offender']
-      return self::error(9011, "Invalid credit card information. Please re-enter.");
+      // TODO FIXME do something with $reply['error'] and $reply['offender']
+      return self::error(9011, "Invalid credit card information. The following fields were invalid: {$reply['offenders']}.");
       break;
     case self::AUTH_ERROR:
       return self::error(9002, 'Could not initiate connection to payment gateway');