Dumplie\CustomerService\Domain\PaymentId::generate PHP Method

generate() public static method

public static generate ( ) : PaymentId
return PaymentId
    public static function generate() : PaymentId
    {
        return new self((string) BaseUUID::uuid4());
    }

Usage Example

Beispiel #1
0
 function test_create_payment()
 {
     $orderId = OrderId::generate();
     $paymentId = PaymentId::generate();
     $this->customerServiceContext->customerPlacedOrder((string) $orderId);
     $command = new CreatePayment((string) $orderId, (string) $paymentId);
     $this->customerServiceContext->commandBus()->handle($command);
     $this->clear();
     $payment = $this->customerServiceContext->payments()->getById($paymentId);
     $this->assertFalse($payment->isPaid());
     $this->assertFalse($payment->isRejected());
 }
All Usage Examples Of Dumplie\CustomerService\Domain\PaymentId::generate
PaymentId