Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/226917
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(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/17/226917/1
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 2db25b9..d8ae260 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: newchange
Gerrit-Change-Id: I09bca28abd8f2cd4ece8414c2ee6ec3eb819f628
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits