Page MenuHomePhabricator

DonationInterface config should be less of a snowflake
Closed, ResolvedPublic

Description

Default configuration should do something useful, in sandbox mode. Document required and additional configuration. Get rid of the pre/post config trickery. Expect that all DI LocalSettings.php stuff will appear after the DI require line.

For an illustration of the problem,

$wgDonationInterfaceEnableGlobalCollect = true;
$wgDonationInterfaceEnableWorldPay = true;
$wgDonationInterfaceEnableFormChooser = true;
$wgContributionTrackingDBserver = 'localhost';
$wgContributionTrackingDBuser = 'user';
$wgContributionTrackingDBpassword = 'pass!23';
$wgContributionTrackingDBname = 'drupal';

require_once "$IP/extensions/ContributionTracking/ContributionTracking.php";
require_once "$IP/extensions/DonationInterface/DonationInterface.php";
require_once 'DonationInterfaceFormSettings.php';

$wgDonationInterfaceUseSyslog = true;

$wgDonationInterfaceFallbackCurrency = 'USD';
$wgPaypalGatewayXclickCountries = array();
$wgPaypalGatewayAccountInfo['default'] = array(
    'AccountEmail' => "tech+test@localhost.net",
);

What we want instead is something like,

require_once "$IP/extensions/DonationInterface/DonationInterface.php";

$wgDonationInterfaceGateways = array( 
    'GlobalCollect',
    'WorldPay',
);  
$wgDonationInterfaceComponents = array( 
    'DonationForm',
    'FormChooser',
    'Minfraud',
    'Syslog',
);
$wgDonationInterfaceFallbackCurrency = 'USD';
....

Event Timeline

awight raised the priority of this task from to Needs Triage.
awight updated the task description. (Show Details)
awight added a subscriber: awight.
awight set Security to None.

Change 208643 had a related patch set uploaded (by Awight):
WIP Make DonationInterface config less of a snowflake

https://gerrit.wikimedia.org/r/208643

Change 208704 had a related patch set uploaded (by Awight):
Move default DonationInterfaceFormSettings into the extension

https://gerrit.wikimedia.org/r/208704

Change 208643 merged by jenkins-bot:
Make DonationInterface config less of a snowflake

https://gerrit.wikimedia.org/r/208643

Change 208704 merged by jenkins-bot:
Move default DonationInterfaceFormSettings into the extension

https://gerrit.wikimedia.org/r/208704

Deployment hint: Save the result of https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?testGetAll=1 before and after enabling new DonationInterfaceFormSettings.php code.

Change 209631 had a related patch set uploaded (by Awight):
Update DonationInterface, includes major config changes

https://gerrit.wikimedia.org/r/209631

Change 209631 merged by Ejegg:
Update DonationInterface, includes major config changes

https://gerrit.wikimedia.org/r/209631

awight added a subscriber: K4-713.

Solving a different way--@K4-713 points out that this isn't testable. We can't do conditional things in $wgExtensionFunctions.

Change 213003 had a related patch set uploaded (by Awight):
WIP Make configuration testable

https://gerrit.wikimedia.org/r/213003

Change 213003 merged by jenkins-bot:
Make configuration testable

https://gerrit.wikimedia.org/r/213003

We are trying to help all open tasks listed under "Work continues after Lyon" at the Wikimedia Hackathon 2015 workboard finding their best way forward. * If you are participating in Wikimania, consider adding the #Wikimania-Hackathon-2015 project to get this task in that loop, which is about to start. * If you think this project could welcome help from a dedicated Google Summer of Code or Outreachy intern, or from an Individual Engagement Grant, add the Possible-Tech-Projects project. * If you would like to receive some other type of support (organizing a Tech Talk, establishing contacts with existing developer teams in Wikimedia or elsewhere, travel sponsorship for a related activity... you name it), please create a subtask explaining your request and associate it with Developer-Advocacy (or you can start by commenting here if you prefer). * Keeping the description, priority and assigned fields up to date always helps. :) For some context about this message, see T101151: Evaluate which projects showcased at the Wikimedia Hackathon should be supported further. It is the last communication related to Wikimedia-Hackathon-2015 that we will post here.

This actually happened.