Improve error handling on IPN
authoreileen <emcnaughton@wikimedia.org>
Tue, 4 Aug 2020 07:44:33 +0000 (19:44 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 4 Aug 2020 07:47:03 +0000 (19:47 +1200)
https://civicrm.stackexchange.com/questions/37277/paypal-standard-payments-are-being-accepted-but-marked-as-incomplete-transaction/37279#37279

shows how unhelpful this error is - getting data from the exception should help.

Targetting 5.28 in case the gitlab relates to a regression & we need to solicit more debug info

CRM/Core/Payment.php

index 277c5346115181dffab1ecf8bc84dee65d98951e..9c998dc66d604dd2dde9ee5c848cd572f2068688 100644 (file)
@@ -1504,7 +1504,8 @@ abstract class CRM_Core_Payment {
     catch (CRM_Core_Exception $e) {
       Civi::log()->error('ipn_payment_callback_exception', [
         'context' => [
-          'backtrace' => CRM_Core_Error::formatBacktrace(debug_backtrace()),
+          'backtrace' => $e->getTraceAsString(),
+          'message' => $e->getMessage(),
         ],
       ]);
     }