public string Make3DPayment(Make3dPaymentRequest model) { try { var appearance = "Kuveyt"; IPaymentFactory factory; switch (appearance) { case "Kuveyt": factory = new KuveytFactory(); break; case "Iyzico": factory = new IyzicoFactory(); break; default: throw new System.NotImplementedException(); } _paymentService = factory.CreatePaymentInstance(); var asd = _parameterService.GetParameter(name: "Kuveyt3DPaymentUserName"); var model2 = new PaymentApiInfo(); model2.ThreeDPaymentUserName = asd.Data.Value; model2.ThreeDPaymentPassword = asd.Data.Value; model2.ThreeDPaymentStoreCustomerNo = asd.Data.Value; model2.ThreeDPaymentStoreCode = asd.Data.Value; model2.ThreeDPaymentOkUrl = asd.Data.Value; model2.ThreeDPaymentFailUrl = asd.Data.Value; model2.ThreeDPaymentUrl = asd.Data.Value; var result = _paymentService.Make3DPayment(model); return(result); } catch (System.Exception ex) { throw; } }
public ServiceResponse <string> Make3DKuveytPayment(/*[FromQuery] RequestFilter requestFilter*/) { try { var req = new Make3dPaymentRequest() { CardCVV2 = "861", CardHolderName = "Halil Koca", CardNumber = "4033602562020327", CardExpireDateMonth = "01", CardExpireDateYear = "20", TotalAmount = (decimal)100 }; var response = _paymentBusiness.Make3DPayment(req); return(new ServiceResponse <string>(response, true, 100, "")); } catch (System.Exception ex) { throw; } }