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:
f5e5ea2
)
Expose payment processor error from PaymentProcessor.pay
author
Jon Goldberg
<jon@megaphonetech.com>
Mon, 7 Mar 2022 20:04:08 +0000
(15:04 -0500)
committer
Jon Goldberg
<jon@megaphonetech.com>
Mon, 7 Mar 2022 20:04:08 +0000
(15:04 -0500)
api/v3/PaymentProcessor.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/PaymentProcessor.php
b/api/v3/PaymentProcessor.php
index 06587f00ca3120f50e4067ed510eda1c3544a814..803f38dce4e4509854108d6b1801f562c4e33e21 100644
(file)
--- a/
api/v3/PaymentProcessor.php
+++ b/
api/v3/PaymentProcessor.php
@@
-123,7
+123,8
@@
function civicrm_api3_payment_processor_pay($params) {
if (empty($code)) {
$code = 'EXTERNAL_FAILURE';
}
- throw new API_Exception('Payment failed', $code, $errorData, $e);
+ $message = $e->getMessage() ?? 'Payment Failed';
+ throw new API_Exception($message, $code, $errorData, $e);
}
return civicrm_api3_create_success(array($result), $params);
}