Fundraising tech

This document should explain or link to everything needed for fundraising tech development.

Rationale
Manage the incoming donation pipeline from Extension:CentralNotice and emails through the Extension:DonationInterface, SmashPig, CRM and reporting modules.

We do not write banners or run tests, we support the people and software that run them.

Fundraising Tech
Technical work supporting the Wikimedia Foundation's fundraising efforts.
 * Fundraising Tech Manager: Katie Horn
 * Fundraising Tech Lead: Elliott Eggleston
 * Phabricator task board: #fundraising-backlog

Goals
Fiscal Year 2017-2018
 * Q3: January – March 2017
 * Q4: April – June 2017
 * Q1: July – September 2017
 * Q2: October -December 2017
 * Q3: January - March 2018

Roadmap
fr-tech's detailed Roadmap

Rhythm and code freeze
We have a special yearly window of not deploying major changes to some critical systems starting in the fall, in preparation for the Big English drive. Game on again in mid-January, assuming we haven't emitted a puff of smoke in early December.

This code freeze gives our development an annual cadence, with each season seeing similar types and intensities of work, year-over-year. Any long-running FR-tech project should take this into account.

Documents

 * Glossary: Fundraising tech/Glossary
 * Regular meetings and their agendas Fundraising tech/FR-tech Meetings
 * Definition of Done: Fundraising tech/Definition of Done
 * Onboarding new team members: Fundraising tech/onboarding
 * Team training matrix: Fundraising tech/Training
 * Roles/Responsibilities: Fundraising tech/Roles and Responsibilities
 * User requirements:
 * Specifications:
 * Software design document: Fundraising tech/Components
 * Essential systems: Fundraising tech/Essential systems
 * New integration manual: Fundraising tech/New integration manual
 * Test plan:
 * Documentation plan:
 * User interface design docs:
 * Schedule:
 * Task management: Phabricator "Fundraising Backlog" tag. More information.
 * Release management plan: Fundraising tech/Deployment
 * Communications plan:
 * Quarterly review documentation: April 2015
 * Payment processor documentation
 * Adyen
 * Amazon
 * AstroPay
 * Ingenico and see filesrv (
 * Developer manual: WebCollect_technical_guide_2013_Q4.pdf
 * Workflows (needs updating): smb://filesrv1/fundraising/Tech/Ingenico/Old/Tech%20specs%20and%20guides%20from%20PaymentProcessing )
 * Note: In the codebase, Ingenico can refer to the older GlobalCollect--Ingenico's former name--integration and the new integration with their updated API
 * PayPal / PayPal Express Checkout

Installing the software stack
Much of our toolchain is provided by MediaWiki-Vagrant, here's how to provision and enjoy a new installation. Be aware that this requires about 2GB of memory and lots of processor. Please follow setup instructions at the main MediaWiki-Vagrant page above, but enable the following role before provisioning for the first time:

vagrant enable-role fundraising

Also note that the fundraising role assumes that the vagrant repo is in /vagrant and that drush is in /usr/local/bin/drush.

Assuming your box builds without error, visit http://payments.wiki.local.wmftest.net:8080/ and the wiki's main page will have links to help you get started. Please note that the wmftests.net subdomain is actually a wildcard DNS that resolves to 127.0.0.1, so if you are running vagrant on a different host than you're browsing from, or if you're offline, you'll need to add hosts entries yourself.

This role also installs CiviCRM, at http://crm.local.wmftest.net:8080/

If you wish to forsake Vagrant and try to do it all the hard way, see Fundraising Tech/Donation Pipeline Setup

Running PHPUnit tests under vagrant (mediawiki-fr)
The fundraising role checks out a separate branch of mediawiki core into /vagrant/mediawiki-fr. Some slight of hand is required to run the tests from that directory and not the primary wiki. From the vagrant directory, do:

FIXME: not working.

vagrant ssh cd /vagrant/mediawiki-fr/tests/phpunit export MW_INSTALL_PATH=/vagrant/mediawiki-fr php phpunit.php --wiki paymentswiki --group DonationInterface

Running PHPUnit tests under vagrant (CiviCRM)
From within the vagrant directory: vagrant ssh

Swap out HHVM for PHP5 locally (you may want to revert this when not testing)
sudo rm /etc/alternatives/php;sudo ln -s /usr/bin/php5 /etc/alternatives/php

Install CiviCRM Build Tools (CV) and add bin dir to profile $PATH
git clone https://github.com/civicrm/civicrm-buildkit ./civicrm-buildkit/bin/civi-download-tools echo 'PATH=$PATH:/vagrant/srv/civicrm-buildkit/bin' >> ~/.profile source ~/.profile

Reset Drupal cache to a known state and fix permissions
cd /vagrant/srv/org.wikimedia.civicrm/drupal drush cc all sudo chown -R :vagrant /vagrant/srv/org.wikimedia.civicrm/drupal/sites/default/files/civicrm/templates_c/ sudo chmod -R g+rw /vagrant/srv/org.wikimedia.civicrm/drupal/sites/default/files/civicrm/templates_c/

Run tests
cd /vagrant/srv/org.wikimedia.civicrm/ ./vendor/bin/phpunit (optionally add --group or --filter to target specific tests e.g. --group Queue2Civicrm will only run tests which include the "@group Queue2Civicrm" annotation within its testcase class doc block)

Testing queue operations under vagrant
Please see Fundraising tech/Queue testing.

Communications
You can find our engineering team on the #wikimedia-fundraising irc channel. Include "fr-tech" in your message to make sure we see it.