Page MenuHomePhabricator
Paste P96512

(An Untitled Masterwork)
ActivePublic

Authored by jgleeson on Wed, Sep 23, 1:49 PM.
Project Tags
None
Referenced Files
F104445530: raw-paste-data.txt
Wed, Sep 23, 1:49 PM
Subscribers
None
MariaDB [civicrm]> SELECT SUBSTRING_INDEX(a.subject, 'failed with ', -1) AS reason, COUNT(DISTINCT cr.id) AS n
-> FROM civicrm_activity a
-> JOIN civicrm_contribution_recur cr ON cr.id = a.source_record_id
-> WHERE a.activity_type_id = (
-> SELECT v.value FROM civicrm_option_value v
-> JOIN civicrm_option_group g ON g.id = v.option_group_id
-> WHERE g.name = 'activity_type' AND v.name = 'Recurring Failure')
-> AND a.activity_date_time BETWEEN '2026-09-22' AND '2026-09-22 23:59:59'
-> AND cr.frequency_unit = 'year'
-> GROUP BY reason ORDER BY n DESC;
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
| reason | n |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
| authorization_failed:invalid_payment_method | 224 |
| authorization_declined:expired_payment_method | 38 |
| Contract not found | 22 |
| authorization_declined:insufficient_funds | 13 |
| authorization_declined:refused_transaction | 11 |
| authorization_failed:unsupported_transaction | 8 |
| authorization_failed:unknown_error | 7 |
| authorization_declined:issuer_decline | 6 |
| authorization_declined:canceled_payment_method | 3 |
| authorization_declined:suspected_fraud | 2 |
| {"errorClass":"VALIDATION","errorType":"user_error","inputPath":["input","paymentMethodId"],"legacyCode":"91518","message":"Multi-use payment method ID is invalid or could not be found."} | 1 |
| authorization_declined:service_decline | 1 |
| authorization_failed:service_rate_limit | 1 |
| Unknown problem charging payment | 1 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
14 rows in set (0.257 sec)