Tüm bankalarla uyumlu sanal pos servisi
Factory pattern structure written with .net5 for payment services
ASSECO , FINANSBANK , VAKIFBANK , GARANTI , YAPIKREDI , PAYTR , PARAMPOS
AKBANK FINANSBANK GARANTI VAKIFBANK ZIRAATBANKASI AKTIFBANK YAPIKREDI DENIZBANK İŞBANKASI HALKBANKASI
PM> Install-Package EPAYMENT
services.AddPaymentProvider();
PM> Injection
private readonly IPaymentProviderFactory _paymentProviderFactory;
public SanalPosController(IPaymentProviderFactory paymentProviderFactory)
{
_paymentProviderFactory = paymentProviderFactory;
}
PM> Using
var _type = PosEngineType.ASSECO;
var paymentProvider = _paymentProviderFactory.Create(_type);
var paymentParameterResult = paymentProvider.GetPaymentParameters(new PaymentRequest()
{
OrderNumber = OrderNumber,
Username = "Username",
Password = "Password",
ClientId = "ClientID",
Email = "[email protected]",
Phone = "0000000",
TotalAmount = 1,
SuccessUrl = $"https://{HttpContext.Request.Host}/Payment/Success?OrderNumber={OrderNumber}",
FailUrl = $"https://{HttpContext.Request.Host}/Payment/Fail?OrderNumber={OrderNumber}",
CustomerIpAddress = HttpContext.Connection.RemoteIpAddress.ToString()
});
var paymentForm = _paymentProviderFactory.CreatePaymentForm(paymentParameterResult.Parameters, _config.GetValue<Uri>("Payment:PosType"));