Feat: Payment Restructuring to be fully event-driven

This commit is contained in:
2026-09-03 17:00:24 +03:00
parent a987a2d57c
commit 35c3334690
13 changed files with 698 additions and 185 deletions
@@ -2,6 +2,7 @@
namespace Modules\Core\Payment\Contracts;
use Lunar\DataTypes\Price;
use Modules\Core\Payment\DTOs\PaymentResult;
/**
@@ -27,10 +28,10 @@ use Modules\Core\Payment\DTOs\PaymentResult;
interface SupportsAuthorization
{
/**
* Same $type/$data/$context reasoning as SupportsPay::pay().
* Same $type/$amount/$data/$context reasoning as SupportsPay::pay().
*
* @param array<string, mixed> $data
* @param array<string, mixed> $context
*/
public function authorize(string $type, array $data, array $context = []): PaymentResult;
}
public function authorize(string $type, Price $amount, array $data = [], array $context = []): PaymentResult;
}