Dumplie\CustomerService\Tests\AbstractCustomerServiceContext::createPaymentFor PHP Méthode

createPaymentFor() public méthode

public createPaymentFor ( OrderId $orderId ) : PaymentId
$orderId Dumplie\CustomerService\Domain\OrderId
Résultat 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;
    }