enisgurkann / EPAYMENT

EPayment - Multi Payment Provider for .Net Core
Apache License 2.0
79 stars 12 forks source link
3dpay akbank asseco dotnetcore finansbank garanti halkbank isbank payment payment-integration payment-module payment-processing paymentmethods paytr sanal-pos-entegrasyonu sanalpos virtualpos yapikredi

alt text

EPAYMENT -Multi Payment Provider for .Net Core

GitHub GitHub Repo stars GitHub last commit Contributors Discussions Nuget version Nuget downloads

Tüm bankalarla uyumlu sanal pos servisi

Factory pattern structure written with .net5 for payment services

BANK ENGINE

ASSECO , FINANSBANK , VAKIFBANK , GARANTI , YAPIKREDI , PAYTR , PARAMPOS

BANKS

AKBANK FINANSBANK GARANTI VAKIFBANK ZIRAATBANKASI AKTIFBANK YAPIKREDI DENIZBANK İŞBANKASI HALKBANKASI

Payment Provider Usage

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 = "test@hotmail.com",
    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"));