Katie Horn has uploaded a new change for review.

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


Change subject: Flooring non-fractional currencies in the DonationData class. 
Apparently just not decimal-formatting them is insufficient for some forms.
......................................................................

Flooring non-fractional currencies in the DonationData class. Apparently just 
not decimal-formatting them is insufficient for some forms.

Change-Id: Ie853f40a17dcb77eb272f7a587afba889df80e48
---
M gateway_common/DonationData.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 98f7e0d..55a64b3 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -638,6 +638,8 @@
                
                if ( DataValidator::is_fractional_currency( $this->getVal( 
'currency_code' ) ) ){
                        $this->setVal( 'amount', number_format( $this->getVal( 
'amount' ), 2, '.', '' ) );
+               } else {
+                       $this->setVal( 'amount', floor( $this->getVal( 'amount' 
) ) );
                }
                $this->expunge( 'amountGiven' );
                $this->expunge( 'amountOther' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie853f40a17dcb77eb272f7a587afba889df80e48
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

Reply via email to