Adamw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57202


Change subject: Paypal recurring redirect was broken
......................................................................

Paypal recurring redirect was broken

Change-Id: Ie5ccd57a86a602d7d621ae84de55357ab9e44db4
---
M paypal_gateway/paypal_gateway.body.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/02/57202/1

diff --git a/paypal_gateway/paypal_gateway.body.php 
b/paypal_gateway/paypal_gateway.body.php
index 58f5260..b030531 100644
--- a/paypal_gateway/paypal_gateway.body.php
+++ b/paypal_gateway/paypal_gateway.body.php
@@ -59,7 +59,10 @@
                                $this->adapter->log( 
$this->adapter->getLogMessagePrefix() . "Unsupported currency forced to USD, 
user notified of action." );
                        }
                } else {
-                       if ( $this->getRequest()->getText( 'recurring', 0 ) ) {
+                       // We also switch on the form name--if we're 
redirecting without stopping
+                       // for user interaction, the form name is our only clue 
that this is recurring.
+                       if ( $this->getRequest()->getText( 'ffname', 'default' 
) === 'paypal-recurring'
+                                       or $this->getRequest()->getText( 
'recurring', 0 ) ) {
                                $result = $this->adapter->do_transaction( 
'DonateRecurring' );
                        } else {
                                $result = $this->adapter->do_transaction( 
'Donate' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5ccd57a86a602d7d621ae84de55357ab9e44db4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Adamw <awi...@wikimedia.org>

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

Reply via email to