Adamw has submitted this change and it was merged.

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(-)

Approvals:
  Adamw: Verified; Looks good to me, approved
  jenkins-bot: Checked



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: merged
Gerrit-Change-Id: Ie853f40a17dcb77eb272f7a587afba889df80e48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Katie Horn <[email protected]>
Gerrit-Reviewer: Adamw <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to