Add PayPal client, donate flow, webhook; wire rules engine with per-goal lock

Replace the static Engine call (which silently failed) with Engine::default()
and a MySQL named lock. Add engine->overlay integration test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 08:47:00 -08:00
1 parent 65082fb2f5
commit 589e84f28b
21 files changed
+1659

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<?php
declare( strict_types=1 );
namespace StreamGoals\PayPal;
/** In-memory cache (tests, or a fallback). Ignores TTL expiry within a request. */
final class ArrayCache implements Cache {
/** @var array<string,mixed> */
private array $items = array();
public function get( string $key ): mixed {
return $this->items[ $key ] ?? false;
}
public function set( string $key, mixed $value, int $ttl ): void {
$this->items[ $key ] = $value;
}
public function delete( string $key ): void {
unset( $this->items[ $key ] );
}
}