Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/341469 )

Change subject: Comments and whitespace
......................................................................

Comments and whitespace

Change-Id: I4893f342187d54bdfb2a14427519f1486d8a6814
---
M gateway_common/GatewayPage.php
M gateway_common/PaymentResult.php
M gateway_common/gateway.adapter.php
M tests/phpunit/GatewayPageTest.php
4 files changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index d084fee..3ad093b 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -231,7 +231,7 @@
                $output->redirect( $page );
        }
 
-       public function redirect ( $url, $responsecode = '302' ) {
+       public function redirect( $url, $responsecode = '302' ) {
                // Do we need to pop out of an iframe?
                if ( $this->isReturnFramed() ) {
                        $this->logger->info(
diff --git a/gateway_common/PaymentResult.php b/gateway_common/PaymentResult.php
index 52be563..77acb8f 100644
--- a/gateway_common/PaymentResult.php
+++ b/gateway_common/PaymentResult.php
@@ -111,6 +111,7 @@
         * @param string $finalStatus final transaction status.
         *
         * @return PaymentResult
+        * TODO: rename to fromResponse
         */
        public static function fromResults( PaymentTransactionResponse 
$response, $finalStatus ) {
                if ( $finalStatus === FinalStatus::FAILED ) {
@@ -121,7 +122,7 @@
                }
                if ( $response->getErrors() ) {
                        // TODO: We will probably want the ability to refresh 
to a new form
-                       // as well and display errors at the same time.
+                       // and display errors at the same time.
                        return PaymentResult::newRefresh( 
$response->getErrors() );
                }
                if ( $response->getRedirect() ) {
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index eb20905..84b980d 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1418,7 +1418,9 @@
                // Feed the message into the pending queue, so the CRM queue 
consumer
                // can read it to fill in donor details when it gets a partial 
message
                $this->sendPendingMessage();
+
                // Avoid 'bad ffname' logspam on return and try again links.
+               // TODO: deprecate
                $this->session_pushFormName( $this->getData_Unstaged_Escaped( 
'ffname' ) );
        }
 
@@ -1442,6 +1444,8 @@
         *        @see getFormattedResponse.  Type depends on 
$this->getResponseType
         * @throws ResponseProcessingException with an actionable error code 
and any
         *         variables to retry
+        *
+        * TODO: Move response parsing to a separate class.
         */
        protected function processResponse( $response ) {
                $this->transaction_response->setCommunicationStatus( true );
diff --git a/tests/phpunit/GatewayPageTest.php 
b/tests/phpunit/GatewayPageTest.php
index 022db06..27edc9c 100644
--- a/tests/phpunit/GatewayPageTest.php
+++ b/tests/phpunit/GatewayPageTest.php
@@ -92,6 +92,7 @@
                TestingGenericAdapter::$fakeGlobals['FallbackCurrency'] = 'OMR';
                TestingGenericAdapter::$fakeGlobals['NotifyOnConvert'] = true;
                TestingGenericAdapter::$acceptedCurrencies[] = 'OMR';
+               // FIXME: Relies on app default exchange rate.  Set explicitly 
instead.
                $this->setUpAdapter();
 
                $this->page->validateForm();

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

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

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

Reply via email to