r79261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79260‎ | r79261 | r79262 >
Date:16:37, 30 December 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Updated amount validation to check for < floor, > ceiling rather than <= and >= respectively
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -313,8 +313,8 @@
314314
315315 // check amount
316316 if ( !preg_match( '/^\d+(\.(\d+)?)?$/', $data[ 'amount' ] ) ||
317 - ( (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) <= (float) $wgPayflowPriceFloor ||
318 - (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) >= (float) $wgPayflowPriceCieling ) ) {
 317+ ( (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) < (float) $wgPayflowPriceFloor ||
 318+ (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) > (float) $wgPayflowPriceCieling ) ) {
319319 $error['invalidamount'] = wfMsg( 'payflowpro_gateway-error-msg-invalid-amount' );
320320 $error_result = '1';
321321 }

Status & tagging log