CRM-17256 credit card failure message not displayed
authoreileenmcnaugton <eileen@fuzion.co.nz>
Thu, 15 Oct 2015 12:31:49 +0000 (01:31 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Thu, 15 Oct 2015 12:31:49 +0000 (01:31 +1300)
CRM/Event/Form/Registration/Confirm.php

index cdce54fcb05b15ae5fca043a21fa8d98eacf819a..b51afc97df8f91c4e64098ccdfcb1437d9fb4934 100644 (file)
@@ -599,10 +599,11 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
           if (is_object($payment)) {
             try {
               $result = $payment->doPayment($value);
+              dpm($result);
               $value = array_merge($value, $result);
             }
             catch (\Civi\Payment\Exception\PaymentProcessorException $e) {
-              CRM_Core_Error::displaySessionError($result);
+              CRM_Core_Session::singleton()->setStatus($e->getMessage());
               CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/event/register', "id={$this->_eventId}"));
             }
           }