Ejemplo n.º 1
0
        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,
            });
        }
Ejemplo n.º 2
0
        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));
        }