private static async Task <RecurringPaymentTestData> BecauseAsync() { var recurringPaymentTestData = new RecurringPaymentTestData(); recurringPaymentTestData.Before = await PreapprovalService.GetPreapprovalPaymentsAsync(PaymentRequest.Payment.PreapprovalID.Value); await Task.Delay(2000); recurringPaymentTestData.PaymentResponse = await _alternativePaymentService.CreateRecurrentPaymentAsync(PaymentRequest); await Task.Delay(1000); recurringPaymentTestData.After = await PreapprovalService.GetPreapprovalPaymentsAsync(PaymentRequest.Payment.PreapprovalID.Value); return(recurringPaymentTestData); }
private static async Task <ApiResult <ApiPreapprovalResponse> > BecauseAsync() { CreatePreapprovalResponse = await PreapprovalService.CreatePreapprovalAsync(PreapprovalRequest); return(await PreapprovalService.GetPreapprovalAsync(CreatePreapprovalResponse.Value.Preapproval.ID.Value)); }