jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379443 )

Change subject: When no form is found, retry without gateway
......................................................................


When no form is found, retry without gateway

This will fix some situations where a donor has changed their mind
and is trying to donate with a payment method not supported by a
gateway that may be left over in session.

Bug: T176356
Change-Id: I74b47e618b61c675f2c54cda66348e938cd10078
---
M special/GatewayFormChooser.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Mepps: Looks good to me, approved
  jenkins-bot: Verified
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/special/GatewayFormChooser.php b/special/GatewayFormChooser.php
index 5666548..645408a 100644
--- a/special/GatewayFormChooser.php
+++ b/special/GatewayFormChooser.php
@@ -71,6 +71,11 @@
                // FIXME: here we should check for ffname, and if that's a 
valid form skip the choosing
                $form = self::getOneValidForm( $country, $currency, 
$paymentMethod, $paymentSubMethod, $recurring, $gateway );
 
+               // If we can't find a good form and we're forcing a gateway, 
try again without the gateway
+               if ( $form === null && $gateway ) {
+                       $form = self::getOneValidForm( $country, $currency, 
$paymentMethod, $paymentSubMethod, $recurring, null );
+               }
+
                if ( $form === null ) {
                        $utmSource = $this->getRequest()->getVal( 'utm_source', 
'' );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/379443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I74b47e618b61c675f2c54cda66348e938cd10078
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <ej...@ejegg.com>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Mepps <me...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org>
Gerrit-Reviewer: Zoranzoki21 <dori.g...@orion.rs>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to