Drop refund handling, finalize captures via webhook, add profanity filter

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 10:20:53 -08:00
1 parent 35f5d1acfb
commit 2e3abf33d9
11 files changed
+420 -82

No files matched your search

+6
View File
@@ -5,6 +5,7 @@ namespace StreamGoals\PayPal;
use StreamGoals\Core\FeeCalculator;
use StreamGoals\Core\Money;
use StreamGoals\Core\ProfanityFilter;
/**
* Pure validation + total computation for a new donation order. The server is the
@@ -57,6 +58,11 @@ final class OrderValidator {
$name = ''; // never persist the name of an anonymous donor
}
// Mask profanity before anything is stored (same-length masking, so length checks above still hold).
$filter = new ProfanityFilter( $settings );
$name = $filter->filter( $name );
$message = $filter->filter( $message );
return array(
'goal_id' => (int) $goal['id'],
'currency' => $currency,