public async Task <ActionResult <BancardResponse> > CardsNew(CancellationToken cancellationToken) { var request = new BancardCardsNewRequest { CardId = 1, ReturnUrl = "https://*****:*****@rugertek.com", UserCellPhone = "+595981123456" }; var response = await _vPosService.CardsNew(request, cancellationToken); return(Ok(response)); }
public async Task <BancardResponse> CardsNew(BancardCardsNewRequest request, CancellationToken cancellationToken = default) { var model = new RequestApiModel <CardsNewOperationApiModel> { PublicKey = _configuration.PublicKey, Operation = new CardsNewOperationApiModel { Token = HashHelper.CardsNew(_configuration.PrivateKey, request.CardId, request.UserId), CardId = request.CardId, UserId = request.UserId, ReturnUrl = request.ReturnUrl, UserMail = request.UserMail, UserCellPhone = request.UserCellPhone } }; var response = await _httpClient.CardsNew(model, cancellationToken); var responseBody = await response.Content.ReadAsAsync <ResponseApiModel>(cancellationToken); return(MapResponse(responseBody, response.IsSuccessStatusCode)); }