jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/370285 )
Change subject: FIXMEs regarding processor_id column
......................................................................
FIXMEs regarding processor_id column
Not so we actually fix the recurring globalcollect, but so we don't
repeat the mistake with the Connect tokenized payments.
Change-Id: I6c0f5013ddf082e80990c58fca74bd16183a6c85
---
M sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
M sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
2 files changed, 9 insertions(+), 4 deletions(-)
Approvals:
jenkins-bot: Verified
Eileen: Looks good to me, approved
diff --git
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
index 83a0758..6ddd21f 100644
--- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
+++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
@@ -313,7 +313,8 @@
) );
$values = array(
'amount' => $subscription->amount,
- 'effort_id' => $subscription->processor_id + 1,
+ // FIXME: should use 'installments' column, not processor_id
+ 'effort_id' => $subscription->processor_id + 1,
'order_id' => $transaction->gateway_txn_id,
'currency' => $subscription->currency,
'payment_product' => '',
@@ -326,6 +327,7 @@
// FIXME hack. This is getting overriden by sad.
$adapter->addRequestData( array(
+ // FIXME: should use 'installments' column, not processor_id
'effort_id' => $subscription->processor_id + 1,
) );
@@ -377,6 +379,7 @@
// Copy stuff from the subscription, and increment the EFFORTID
'amount' => $contribution_recur['amount'],
'contact_id' => $contribution_recur['contact_id'],
+ // FIXME: should use 'installements' column, not processor_id
'effort_id' => $contribution_recur['processor_id'],
'order_id' => $transaction->gateway_txn_id,
'currency_code' => $contribution_recur['currency'],
diff --git
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
index 99dae1a..43758f0 100644
---
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
+++
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
@@ -155,7 +155,7 @@
* There are two different queries in this function.
* - payments need to be marked as failure
* - payments need to be marked as cancelled if there have been two prior
failures for this EFFORTID (`processor_id`)
- *
+ * FIXME: should use 'installements' column, not processor_id
* These are the possible values for `contribution_status_id`:
* XXX actually the ids are determined by querying the db
* - [1] => Completed (previous donation succeeded, or new donation that has
never been recurred before)
@@ -268,9 +268,9 @@
*
* Payments will be rescheduled for the following month.
*
- * @param integer $id The primary key of the record.
+ * @param integer $id The primary key of the record.
*
- * @return integer Returns the number of affected rows.
+ * @return int Returns the number of affected rows.
*/
function _recurring_globalcollect_update_record_success($id) {
@@ -292,6 +292,8 @@
'contribution_status_id' =>
civicrm_api_contribution_status('Completed'),
'next_sched_contribution_date' => $next_sched_contribution,
) )
+ // FIXME: misuse of processor_id - it should indicate which payment
+ // processor the recurring payment is registered with.
->expression( 'processor_id', "processor_id + 1" )
->condition( 'id', $id )
->execute();
--
To view, visit https://gerrit.wikimedia.org/r/370285
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c0f5013ddf082e80990c58fca74bd16183a6c85
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits