public async Task <AdvanceReceiptsResult> GetAdvanceReceipts([FromBody] long originalReceiptId, CancellationToken token) { var originalReceipt = await receiptProcessor.GetReceiptAsync(originalReceiptId); var advanceReceipts = (await advanceReceivedProcessor.GetAdvanceReceiptsAsync(originalReceiptId)).ToList(); return(new AdvanceReceiptsResult { ProcessResult = new ProcessResult { Result = true }, OriginalReceipt = originalReceipt, AdvanceReceipts = advanceReceipts, }); }
public async Task <AdvanceReceiptsResult> GetAdvanceReceiptsAsync(string SessionKey, long originalReceiptId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var originalReceipt = await receiptProcessor.GetReceiptAsync(originalReceiptId, token); var advanceReceipts = (await advanceReceivedProcessor.GetAdvanceReceiptsAsync(originalReceiptId, token)).ToList(); return new AdvanceReceiptsResult { ProcessResult = new ProcessResult { Result = true }, OriginalReceipt = originalReceipt, AdvanceReceipts = advanceReceipts, }; }, logger)); }