Fundraising tech/audit parser
This documents the workflow to process audit files from payment processors and import missing messages into CiviCRM.
For all payment processors, except PayPal, the parse-audit drush command processes the audit files.
Audit files are located on civi1001 in /srv/archive/civi1001/audit/[payment-processor] and divided into two directories: incoming and completed.
Payment Processor Specific InformationEdit
Ingenico (new integration)Edit
The new api sends the transactions in the same file as the old api, but these transactions can be identified because they have the tag EmailTypeIndicator.
The files are located in /srv/archive/civi1001/audit/globalcollect. While there are multiple files in this directory, the ones we parse begin with wx1 and are in a xml.gz format.
We pay attention to records classified with these codes (Recordcategory + recordtype):
- XON - Credit card item that has been processed, but not settled.
- +IP - Settled "Invoice Payment". Could be invoice, bt, rtbt, check, prepaid card, ew, cash
- -CB - Credit card chargeback
- -CR - Refund on collected credit card payment
- XCR - Any old refund
- +AP - Direct Debit collected
PayPal uses a python script deployed in the fundraising tools repository: https://phabricator.wikimedia.org/diffusion/WFTO/browse/master/audit/paypal/
We currently use PayPal's Express Checkout integration, and classify those donations using gateway value 'paypal_ec'. However, we still have some legacy recurring donations from the old integration, and those are classified with gateway value 'paypal'.