public function __construct(PaymentId $id, Order $order) { $this->id = $id; $this->createdAt = new \DateTimeImmutable(); $this->orderId = $order->id(); $this->state = new Unpaid(); }