public static PoliPayment ToRequest(this PoliRequestModel instance) { return(new PoliPayment { ItemId = instance.ItemId, ItemType = instance.ItemType.GetValueOrDefault(), CancellationUrl = instance.CancellationUrl, SuccessUrl = instance.SuccessUrl, FailureUrl = instance.FailureUrl, PaymentMethod = PaymentMethod.Poli }); }
public IHttpActionResult Post([FromBody] PoliRequestModel model) { var response = _onlinePaymentManager.Begin(model.ToRequest(), _startPaymentStrategy, new ResponseCreator <StartPoliPaymentResponse>()); return(Ok(response)); }