Пример #1
0
        public override Task <BankCardPaymentUrlResponse> GetBankCardPaymentUrl(BankCardPaymentUrlRequest request, ServerCallContext context)
        {
            var resp = new BankCardPaymentUrlResponse();

            resp.Result = new BankCardPaymentUrlResponse.Types.BankCardPaymentUrl()
            {
                OkUrl             = "",
                FailUrl           = "",
                ReloadRegex       = "",
                Url               = "",
                UrlsToFormatRegex = ""
            };

            return(Task.FromResult(resp));
        }
Пример #2
0
        public override async Task <BankCardPaymentUrlResponse> GetBankCardPaymentUrl(BankCardPaymentUrlRequest request, ServerCallContext context)
        {
            var result = new BankCardPaymentUrlResponse();

            var token    = context.GetBearerToken();
            var response =
                await _walletApiV1Client.BankCardPaymentUrlAsync(_mapper.Map <BankCardPaymentUrlInputModel>(request),
                                                                 string.Empty,
                                                                 token);

            if (response.Result != null)
            {
                result.Body = _mapper.Map <BankCardPaymentUrlResponse.Types.Body>(response.Result);
            }

            if (response.Error != null)
            {
                result.Error = response.Error.ToApiError();
            }

            return(result);
        }