예제 #1
0
        public async Task Insert(int cardholderId, TokenProvisioningEntity entity, CancellationToken ct)
        {
            entity.PartitionKey = cardholderId.ToString();
            entity.RowKey       = $"{Guid.NewGuid():N}";

            var insert = TableOperation.Insert(entity);

            await Table
            .ExecuteAsync(insert, ct);
        }
예제 #2
0
        private async Task SaveTokenProvisioning(DecisionRequest model, int statusCode, int delay, DecisionResponse response)
        {
            var entity = new TokenProvisioningEntity
            {
                SharedSecret = GetSharedSecretFromHeaders(),
                StatusCode   = statusCode,
                DelayMls     = delay,
                RequestJson  = model.ToJson(),
                ResponseJson = response.ToJson()
            };

            await _tokenProvisioningStorage
            .Insert(model.AcctId, entity, CancellationToken.None);
        }