Donate form: custom-amount label, visible minimum, fee-cover info icon; hard 1.00 floor; purge abandoned checkouts; drop refund filters; soften personal-account wording
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a259c0b0a1
commit
e22675f54b
13 files changed
+177
-15
No files matched your search
@@ -94,9 +94,9 @@ final class OrderValidator {
|
||||
} catch ( \InvalidArgumentException $e ) {
|
||||
throw new ValidationException( 'invalid_amount', 'Please enter a valid amount.' );
|
||||
}
|
||||
$min = (int) ( $settings['min_donation_minor'] ?? 0 );
|
||||
$min = \StreamGoals\Core\Settings::effectiveMin( (int) ( $settings['min_donation_minor'] ?? 0 ) );
|
||||
if ( $base <= 0 || $base < $min ) {
|
||||
throw new ValidationException( 'amount_too_small', 'The amount is below the minimum donation.' );
|
||||
throw new ValidationException( 'amount_too_small', 'The minimum donation is ' . ( new Money( $min, $currency ) )->toDecimalString() . ' ' . $currency . '.' );
|
||||
}
|
||||
if ( $base > 99999999 ) { // sanity cap (~$999,999.99)
|
||||
throw new ValidationException( 'amount_too_large', 'The amount is too large.' );
|
||||
|
||||
Reference in new issue
Block a user