private static async Task PerformPosRequest(ReceiptRequest req)
        {
            try
            {
                PrintRequest(req);
                var resp = await pos.SignAsync(req);

                PrintResponse(resp);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("An error occured when trying to send the request.");
                Console.Error.WriteLine(ex);
            }
        }
Пример #2
0
        private static async Task ExecuteSignAsync(ReceiptRequest req)
        {
            try
            {
                ConsoleHelper.PrintRequest(req);
                var resp = await _pos.SignAsync(req);

                ConsoleHelper.PrintResponse(resp);
            }
            catch (RpcException ex)
            {
                Console.Error.WriteLine("An error occured when trying to send the request.");
                Console.Error.WriteLine(ex);
                foreach (var entry in ex.Trailers)
                {
                    Console.Error.WriteLine($"[{entry.Key}] {entry.Value}");
                }
            }
        }
 public Task <ifPOS.v1.ReceiptResponse> SignAsync(ifPOS.v1.ReceiptRequest request) => _innerPOS.SignAsync(request);