We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2bf1c84 + c4750ee commit 976dab4Copy full SHA for 976dab4
api/v3/Job/ProcessRecurring.php
@@ -1,4 +1,5 @@
1
<?php
2
+
3
/**
4
* Pass all due recurring contributions to the processor to action (if possible).
5
*
@@ -65,12 +66,13 @@ function civicrm_api3_job_process_recurring($params) {
65
66
'id' => $recurringPayment['id'],
67
'failure_count' => $recurringPayment['failure_count'] + 1,
68
]);
- civicrm_api3('Contribution', 'create', [
69
+ if (!empty($pending['id'])) {
70
+ civicrm_api3('Contribution', 'create', [
71
'id' => $pending['id'],
72
'contribution_status_id' => 'Failed',
73
'debug' => $params['debug'] ?? 0,
- ]
- );
74
+ ]);
75
+ }
76
$result[$recurringPayment['id']]['error'] = $e->getMessage();
77
$result['failed']['ids'] = $recurringPayment['id'];
78
}
0 commit comments