You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
1009 B

using DealerSelection.Api.Interface;
using Model = DealerSelection.Api.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using DealerSelection.WebApi.Models;
namespace DealerSelection.WebApi.Controllers;
[ApiController]
public class CCAvenueController : ControllerBase
{
private ICCAvenueApi Api { get; }
public CCAvenueController(ICCAvenueApi api)
{
Api = api;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
[Authorize]
[HttpPost]
[ProducesResponseType(StatusCodes.Status200OK)]
[SwaggerOperation(Tags = new[] { "Cancellation" })]
[Route("cancelorder")]
public async Task<RefundResponse> RefundOrder(RefundRequest details)
{
Model.RefundApiResponse apiresponse= await Api.RefundOrder(details.bookingId, details.transactionId);
RefundResponse response = MapperConfig.MapRefundResponse(apiresponse);
return response;
}
}