Commit 0a7ee88b authored by mattwire's avatar mattwire
Browse files

Empty message in webhook queue on success

parent 52befd01
......@@ -339,6 +339,10 @@ class CRM_Core_Payment_StripeIPN {
->addValue('status', $return->ok ? 'success' : 'error')
->addValue('processed_date', 'now');
if ($return->ok && empty($return->message)) {
// We may have had error messages or eg. "scheduled for retry" but don't need this now we succeeded.
$paymentProcessorWebhookUpdate->addValue('message', '');
// Only add message if not empty
if (!empty($return->message)) {
$paymentProcessorWebhookUpdate->addValue('message', preg_replace('/^(.{250}).*/su', '$1 ...', $return->message));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment