Skip to content
Snippets Groups Projects
Commit 560a6a07 authored by eileen's avatar eileen
Browse files

financial#131 Give deprecation notice if the payment processor returns an error

This notice will show up on dev sites & should highlight the expectation that processors throw errors
parent d4b99fb8
No related branches found
No related tags found
No related merge requests found
......@@ -1375,6 +1375,7 @@ abstract class CRM_Core_Payment {
}
}
if (is_a($result, 'CRM_Core_Error')) {
CRM_Core_Error::deprecatedFunctionWarning('payment processors should throw exceptions rather than return errors');
throw new PaymentProcessorException(CRM_Core_Error::getMessages($result));
}
return $result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment