Katie Horn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/100702
Change subject: More ffname cleanup. Now checks the form array in the donor's
session to see if a form has been successfully loaded on a previous click, and
if so, defaults to that ffname.
......................................................................
More ffname cleanup.
Now checks the form array in the donor's session to see if a form
has been successfully loaded on a previous click, and if so,
defaults to that ffname.
Change-Id: I926901de74672eb088cf3cb2670d1dc32e24f0e3
---
M gateway_common/gateway.adapter.php
1 file changed, 6 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/02/100702/1
diff --git a/gateway_common/gateway.adapter.php
b/gateway_common/gateway.adapter.php
index 2ad61bd..2354d90 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -3118,6 +3118,12 @@
if ( !is_null( $ffname ) && GatewayFormChooser::isValidForm(
$ffname, $country, $currency, $payment_method, $payment_submethod, $recurring,
$gateway ) ) {
return;
+ } else if ( $this->session_getLastRapidHTMLForm() ) { //This
will take care of it if this is an ajax request, or a 3rd party return hit
+ $new_ff = $this->session_getLastRapidHTMLForm();
+ $this->addData( array ( 'ffname' => $new_ff ) );
+
+ //and debug log a little
+ $this->log( "Setting form to last successful
('$new_ff')", LOG_DEBUG );
} else if ( GatewayFormChooser::isValidForm( $ffname .
"-$country", $country, $currency, $payment_method, $payment_submethod,
$recurring, $gateway ) ) {
//if the country-specific version exists, use that.
$this->addData( array ( 'ffname' => $ffname .
"-$country" ) );
--
To view, visit https://gerrit.wikimedia.org/r/100702
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I926901de74672eb088cf3cb2670d1dc32e24f0e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Katie Horn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits