Dumplie\CustomerService\Application\Command\CreatePaymentHandler::handle PHP 메소드

handle() 공개 메소드

public handle ( CreatePayment $command )
$command CreatePayment
    public function handle(CreatePayment $command)
    {
        $order = $this->orders->getById(new OrderId($command->orderId()));
        $this->payments->add(new Payment(new PaymentId($command->paymentId()), $order));
    }
CreatePaymentHandler