コード例 #1
0
        ///<inheritdoc/>
        public async Task ProccessPaymentAsync(PaymentCreated paymentCreated)
        {
            var updatePaymentEvent = new UpdatePaymentEvent
            {
                RequestId     = paymentCreated.RequestId,
                BankRequestId = Guid.NewGuid().ToString(),
                State         = DateTimeOffset.UtcNow.ToUnixTimeSeconds() % 2 == 0 ? TransactionStateEnum.Payed : TransactionStateEnum.Failed
            };

            await _endpoint.Publish <UpdatePaymentEvent>(updatePaymentEvent);
        }
コード例 #2
0
 public void When(PaymentCreated paymentCreated)
 {
     PaymentId = paymentCreated.PaymentId;
 }