Dumplie\CustomerService\Tests\AbstractCustomerServiceContext::createPaymentFor PHP Method

createPaymentFor() public method

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