Ejegg has uploaded a new change for review.

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

Change subject: Fix merchant order ID on order reference
......................................................................

Fix merchant order ID on order reference

We were calling setOrderReferenceDetails with the wrong argument,
so we didn't associate a merchant order ID with the txn until we
attempted authorization.

Bug: T147973
Change-Id: I51ef1c326591cefccde8f95cb4fa20b25ae3ae7b
---
M amazon_gateway/amazon.adapter.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 13ccdc1..5608f08 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -298,7 +298,7 @@
                        'amount' => $this->getData_Staged( 'amount' ),
                        'currency_code' => $this->getData_Staged( 
'currency_code' ),
                        'seller_note' => WmfFramework::formatMessage( 
'donate_interface-donation-description' ),
-                       'seller_order_reference_id' => $this->getData_Staged( 
'order_id' ),
+                       'seller_order_id' => $this->getData_Staged( 'order_id' 
),
                ) );
                $orderRefs = WmfFramework::getSessionValue( 'order_refs' );
                $orderRefs[$orderReferenceId] = true;
diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php 
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
index 19cfcb4..8284d51 100644
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ b/tests/phpunit/Adapter/Amazon/AmazonTest.php
@@ -146,7 +146,7 @@
                $mockClient = TestingAmazonAdapter::$mockClient;
                $setOrderReferenceDetailsArgs = 
$mockClient->calls['setOrderReferenceDetails'][0];
                $oid = $gateway->getData_Unstaged_Escaped( 'order_id' );
-               $this->assertEquals( $oid, 
$setOrderReferenceDetailsArgs['seller_order_reference_id'], 'Did not set order 
id on order reference' );
+               $this->assertEquals( $oid, 
$setOrderReferenceDetailsArgs['seller_order_id'], 'Did not set order id on 
order reference' );
                $this->assertEquals( $init['amount'], 
$setOrderReferenceDetailsArgs['amount'], 'Did not set amount on order 
reference' );
                $this->assertEquals( $init['currency_code'], 
$setOrderReferenceDetailsArgs['currency_code'], 'Did not set currency code on 
order reference' );
                $queued = $gateway->queue_messages;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51ef1c326591cefccde8f95cb4fa20b25ae3ae7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

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

Reply via email to