-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-21554 Offline Credit Card Membership Renewal not showing any error message on failure #11408
Conversation
@sunilpawar what is the path involved here? All the calls to CRM_Core_Error::getMessages() that I found were wrapped in a CRM_Core_Error check
I personally think this block (off Registration_Confirm) where the payment is caught & handled on the form is probably where we want the code to go (it could be more generic with a redirectOnErrorUrl in it)
|
CRM_Core_Error::displaySessionError function call getMessages function.
When we call doPayment function and if receive any error we create 'CRM_Core_Error' object with error message received from payment gateway.
We are catching this exception in membership signup and renewal form and try to show error message to user. but CRM_Core_Error::getMessages() was only checking error of 'CRM_Core_Error'. CRM_Core_Error::displaySessionError() get return NULL from CRM_Core_Error::getMessages(). |
we can use used at multiple places i mentioned in above comment. |
@sunilpawar does calling CRM_Core_Error::displaySessionError add any value that you can see? When I look at those places if feels to me that it was mostly a (not entirely successful) migration strategy for switching towards the use of exceptions. I found 3 places where it occurs within a try-catch block like
I think it makes more sense to just call (I note that
is totally broken :-)) |
@eileenmcnaughton made changes your suggestion. |
looks good to me. |
CRM-21554 Offline Credit Card Membership Renewal not showing any error message on failure
Offline Credit Card Membership Renewal not showing any error message on failure
Function CRM_Core_Error::getMessages() check Exception is of 'CRM_Core_Error' class while it is from class 'Civi\Payment\Exception\PaymentProcessorException'
Hence unable to show the Error message received from Payment gateway.
So added additional check for ' 'Civi\Payment\Exception\PaymentProcessorException'