jenkins-bot has submitted this change and it was merged.
Change subject: Set subscr_id on Amazon recurring if missing
......................................................................
Set subscr_id on Amazon recurring if missing
Bug: T111431
Change-Id: I5818cb5c91884a7eec7250a8c7d36422b3965fb5
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 7330420..549d73a 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1401,10 +1401,14 @@
$msg['create_date'] = $msg['date'];
}
- if ( $msg['recurring'] and $msg['gateway'] == 'globalcollect' ) {
- if ( !$msg['subscr_id'] ) {
+ if ( $msg['recurring'] and !$msg['subscr_id'] ) {
+ if ( $msg['gateway'] == 'globalcollect' ) {
// Well randomly grab an ID, of course :-/
$msg['subscr_id'] = $msg['gateway_txn_id'];
+ } else if ( $msg['gateway'] == 'amazon' ) {
+ // Amazon 'subscription id' is the Billing Agreement ID, which
+ // is a substring of the Capture ID we record as 'gateway_txn_id'
+ $msg['subscr_id'] = substr( $msg['gateway_txn_id'], 0, 19 );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/244708
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5818cb5c91884a7eec7250a8c7d36422b3965fb5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits