public function createPaymentFor(OrderId $orderId) : PaymentId { $paymentId = PaymentId::generate(); $command = new CreatePayment((string) $orderId, (string) $paymentId); $this->commandBus->handle($command); return $paymentId; }