Mwalker has submitted this change and it was merged.
Change subject: (FR #1323) ignore debits unless it is a refund
......................................................................
(FR #1323) ignore debits unless it is a refund
This prevents us from sending thank-you letters to self for taking money out of
the account.
Change-Id: I621f7d39d968d229847352522afd45a4ba980ed8
---
M audit/paypal/TrrFile.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Mwalker: Looks good to me, approved
jenkins-bot: Verified
diff --git a/audit/paypal/TrrFile.py b/audit/paypal/TrrFile.py
index 479435c..1d492b7 100644
--- a/audit/paypal/TrrFile.py
+++ b/audit/paypal/TrrFile.py
@@ -80,6 +80,11 @@
if row['Transaction Event Code'] == 'T0002':
queue = 'recurring'
out = self.normalize_recurring(out)
+ elif row['Transaction Debit or Credit'] == 'DR':
+ # sic: double-space is coming from the upstream
+ log.info(-"Debit\t{id}\t{date}\tPayment
to".format(id=out['gateway_txn_id'], date=out['date'])
+ # This payment is from us! Do not send to the CRM.
+ return
else:
queue = 'donations'
elif event_type in ('T11', 'T12'):
--
To view, visit https://gerrit.wikimedia.org/r/114054
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I621f7d39d968d229847352522afd45a4ba980ed8
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>
Gerrit-Reviewer: Adamw <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits