jenkins-bot has submitted this change and it was merged. Change subject: Use old error forms for AstroPay fail page ......................................................................
Use old error forms for AstroPay fail page TODO: create mustache error form. Bug: T106053 Change-Id: I09bca28abd8f2cd4ece8414c2ee6ec3eb819f628 --- M DonationInterfaceFormSettings.php M astropay_gateway/astropay.adapter.php 2 files changed, 7 insertions(+), 3 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/DonationInterfaceFormSettings.php b/DonationInterfaceFormSettings.php index a80f32b..98f9074 100644 --- a/DonationInterfaceFormSettings.php +++ b/DonationInterfaceFormSettings.php @@ -563,19 +563,19 @@ $forms_whitelist['error-default'] = array ( 'file' => $form_dirs['default'] . '/error-cc.html', - 'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'paypal', 'worldpay' ), + 'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'astropay', 'paypal', 'worldpay' ), 'special_type' => 'error', //buuuurble ); $forms_whitelist['error-noform'] = array ( 'file' => $form_dirs['default'] . '/error-noform.html', - 'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'paypal', 'worldpay' ), + 'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'astropay', 'paypal', 'worldpay' ), 'special_type' => 'error', ); $forms_whitelist['error-cc'] = array ( 'file' => $form_dirs['default'] . '/error-cc.html', - 'gateway' => array ( 'globalcollect', 'adyen', 'worldpay' ), + 'gateway' => array ( 'globalcollect', 'adyen', 'astropay', 'worldpay' ), 'payment_methods' => array ( 'cc' => 'ALL' ), 'special_type' => 'error', ); diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 08b0950..66ea948 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -27,6 +27,10 @@ const GLOBAL_PREFIX = 'wgAstropayGateway'; public function getFormClass() { + if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 'error') === 0 ) { + // TODO: make a mustache error form + return parent::getFormClass(); + } return 'Gateway_Form_Mustache'; } -- To view, visit https://gerrit.wikimedia.org/r/226917 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09bca28abd8f2cd4ece8414c2ee6ec3eb819f628 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits