private async Task <CheckPaymentRequestData> SendCheckPaymentRequest(PaymentRequest request) { CheckPaymentRequestData data = new CheckPaymentRequestData(request.KassaPaymentId); try { await CheckPaymentRequest.Run(this._client, data, this._logger); } catch (Exception e) { this._logger.LogError(e.ToString()); } finally { this._fileLogger.WriteCheckLog(request.Id, data); } return(data); }
public static async Task Run(HttpClient client, CheckPaymentRequestData data, ILogger logger) { CheckPaymentRequest request = new CheckPaymentRequest(client, logger); await request.Run(data); }