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 created this task.Mar 30 2015, 8:24 PM
awight raised the priority of this task from to Needs Triage.
awight updated the task description. (Show Details)
awight added a subscriber: awight.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 30 2015, 8:24 PM
awight updated the task description. (Show Details)Mar 31 2015, 8:36 PM
awight set Security to None.
awight updated the task description. (Show Details)Mar 31 2015, 8:45 PM

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

awight claimed this task.May 7 2015, 1:04 AM
awight added a comment.May 7 2015, 7:39 AM

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 closed this task as Resolved.May 11 2015, 6:04 PM
awight reopened this task as Open.May 23 2015, 6:16 PM
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

awight reassigned this task from awight to K4-713.May 23 2015, 10:19 PM
awight moved this task from Backlog to Review on the Fundraising Sprint Kraftwerk board.

Change 213003 merged by jenkins-bot:
Make configuration testable

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

Qgil added a subscriber: Qgil.Jun 4 2015, 10:43 AM

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.

awight closed this task as Resolved.Aug 3 2015, 10:04 PM

This actually happened.