public function paymentId() : string { return $this->paymentId; }
/** * @param PayPayment $command * @throws InvalidTransitionException */ public function handle(PayPayment $command) { $payment = $this->payments->getById(new PaymentId($command->paymentId())); $payment->pay(); }