Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/220944
Change subject: WIP AstroPay audit module ...................................................................... WIP AstroPay audit module Change-Id: I095134ec841f88613bcccbc4251874519b4f8042 --- A sites/all/modules/wmf_audit/astropay/AstroPayAuditProcessor.php A sites/all/modules/wmf_audit/astropay/astropay_audit.info A sites/all/modules/wmf_audit/astropay/astropay_audit.module 3 files changed, 75 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/44/220944/1 diff --git a/sites/all/modules/wmf_audit/astropay/AstroPayAuditProcessor.php b/sites/all/modules/wmf_audit/astropay/AstroPayAuditProcessor.php new file mode 100644 index 0000000..0a12ad1 --- /dev/null +++ b/sites/all/modules/wmf_audit/astropay/AstroPayAuditProcessor.php @@ -0,0 +1,9 @@ +<?php + +use SmashPig\PaymentProviders\AstroPay\Audit\AstroPayAudit; + +class AstroPayAuditProcessor extends BaseAuditProcessor { + protected $name = 'astropay'; + + // XXX +} diff --git a/sites/all/modules/wmf_audit/astropay/astropay_audit.info b/sites/all/modules/wmf_audit/astropay/astropay_audit.info new file mode 100644 index 0000000..540c6ae --- /dev/null +++ b/sites/all/modules/wmf_audit/astropay/astropay_audit.info @@ -0,0 +1,7 @@ +name = AstroPay Audit +description = Auditing framework for contacts and contributions that come in through nightly reconciliation files, for AstroPay +core = 7.x +dependencies[] = wmf_audit +package = WMF Audit +configure = admin/config/wmf_audit/astropay_audit +files[] = AstroPayAuditProcessor.php diff --git a/sites/all/modules/wmf_audit/astropay/astropay_audit.module b/sites/all/modules/wmf_audit/astropay/astropay_audit.module new file mode 100644 index 0000000..cb06bdd --- /dev/null +++ b/sites/all/modules/wmf_audit/astropay/astropay_audit.module @@ -0,0 +1,59 @@ +<?php + +/** + * Implementation of hook_menu() + */ +function astropay_audit_menu() { + $items = array(); + + $items['admin/config/wmf_audit/astropay_audit'] = array( + 'title' => 'AstroPay Audit', + 'description' => t('Configure WMF audit settings.'), + 'access arguments' => array('administer wmf_audit'), + 'page callback' => 'drupal_get_form', + 'page arguments' => array( 'astropay_audit_settings' ), + ); + + return $items; +} + +/** + * Callback for menu + */ +function astropay_audit_settings() { + $form['astropay_audit_recon_files_dir'] = array( + '#type' => 'textfield', + '#title' => t( 'Directory containing incoming reconciliation files' ), + '#required' => TRUE, + '#default_value' => variable_get( 'astropay_audit_recon_files_dir' ), + ); + $form['astropay_audit_recon_completed_dir'] = array( + '#type' => 'textfield', + '#title' => t( 'Directory for completed reconciliation files' ), + '#required' => TRUE, + '#default_value' => variable_get( 'astropay_audit_recon_completed_dir' ), + ); + $form['astropay_audit_working_log_dir'] = array( + '#type' => 'textfield', + '#title' => t('Working directory for payments logs (Not the source - that is defined at the wmf_audit level)'), + '#required' => TRUE, + '#default_value' => variable_get('astropay_audit_working_log_dir'), + ); + $form['astropay_audit_test_mode'] = array( + '#type' => 'checkbox', + '#title' => t( 'When this box is checked, no stomp messages will be sent.' ), + '#required' => FALSE, + '#default_value' => variable_get( 'astropay_audit_test_mode' ), + ); + $form['astropay_audit_log_search_past_days'] = array( + '#type' => 'textfield', + '#title' => t( 'Plus or minus log search (in days)' ), + '#required' => TRUE, + '#default_value' => variable_get('astropay_audit_log_search_past_days'), + ); + return system_settings_form( $form ); +} + +function astropay_audit_create_processor( $options ) { + return new AstroPayAuditProcessor( $options ); +} -- To view, visit https://gerrit.wikimedia.org/r/220944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I095134ec841f88613bcccbc4251874519b4f8042 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits