projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4b99fb
)
dev/financial#131 Give deprecation notice if the payment processor returns an error
author
eileen
<emcnaughton@wikimedia.org>
Sat, 13 Jun 2020 01:18:11 +0000
(13:18 +1200)
committer
eileen
<emcnaughton@wikimedia.org>
Sat, 13 Jun 2020 01:18:11 +0000
(13:18 +1200)
This notice will show up on dev sites & should highlight the expectation that processors throw errors
CRM/Core/Payment.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Payment.php
b/CRM/Core/Payment.php
index c4e4deb2c583126aa1ee2ce6abef3f4d142de747..ab955db1497f6a89e92b7ce9616cc8b8ffc9b958 100644
(file)
--- a/
CRM/Core/Payment.php
+++ b/
CRM/Core/Payment.php
@@
-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;