PaymentIntegration 1.1.5
dotnet add package PaymentIntegration --version 1.1.5
NuGet\Install-Package PaymentIntegration -Version 1.1.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PaymentIntegration" Version="1.1.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PaymentIntegration" Version="1.1.5" />
<PackageReference Include="PaymentIntegration" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PaymentIntegration --version 1.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PaymentIntegration, 1.1.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PaymentIntegration@1.1.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PaymentIntegration&version=1.1.5
#tool nuget:?package=PaymentIntegration&version=1.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Using the Payment-Integration Library for .Net Framework and .Net Core
Supports .NET Framework, .NET Core 1.1, .NET Core 2.0 runtimes, .NET Core 2.1 runtimes
Installation
To install Payment Integration, run the following command in the Package Manager Console
Install-Package PaymentIntegration
https://www.nuget.org/packages/PaymentIntegration
Usage
Auth
//For security
var paymentOptions = new PaymentOptions(
"url",
"yourApiKey",
"yourSecretKey");
AuthRequest req = new AuthRequest();
authReq.Amount = 2;
authReq.CardNo = "1111111111111111";
authReq.Currency = 978;
authReq.Cvv2 = "111";
authReq.Ecommerce = true;
authReq.Expiry = YYMM;
authReq.Lang = "TR";
authReq.OrderId = "123"; //must be uniq
Payment paymentManager = new Payment(paymentOptions);
var payment = await paymentManager.Auth(authReq);
Auth3D
var paymentOptions = new PaymentOptions(
"url",
"yourApiKey",
"yourSecretKey");
var auth3DRequest = new Auth3DRequest();
auth3DRequest.Amount = 500;//5.00
auth3DRequest.CardNo = "1122112211221122";
auth3DRequest.Currency = 978;
auth3DRequest.Cvv2 = "123";
auth3DRequest.Ecommerce = true;
auth3DRequest.Expiry = 2408;//YYMM
auth3DRequest.InstallmentCount = 1;
auth3DRequest.Lang = "TR";
auth3DRequest.OrderId = DateTime.Now.Ticks.ToString();
var payment = new Payment(paymentOptions);
var response = await payment.Auth3D(auth3DRequest);
if (response.IsConnectionSuccess)//StatusCode=200
if (response.Result.State == PaymentState.Success)
{
var html64 = response.Result.Result.HtmlContent;
var htmlContent = Encoding.UTF8.GetString(Convert.FromBase64String(html64));
return Content(htmlContent, "text/html");
}
else
return View(new ErrorViewModel() { ErrorMessage = response.Result.Result.ResultMessage });
return View(new ErrorViewModel() { ErrorMessage = "Connection Error:" + response.StatusCode });
The return url should receive the token and reach the payment result by checking.
Example MVC;
public async Task<IActionResult> Index(string token)
{
var paymentOptions = new PaymentOptions(
"url",
"yourApiKey",
"yourSecretKey");
Payment paymentManager = new Payment(paymentOptions);
var checkReq=new CheckPaymentRequest() { Token = token }
var checkResp = await paymentManager.CheckPayment(checkReq);
//you can save response data or show your screen
}
Use Encryption
If you want the request to be encrypted
var paymentOptions = new PaymentOptions(
"url",
"yourApiKey",
"yourSecretKey",
true,
"yourEncryptionPassword");
Example UI (.Net5 MVC) project https://github.com/BurakOZN/payment-integration-example
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.1.5 | 563 | 8/13/2021 |
1.1.4 | 438 | 4/1/2021 |
1.1.3 | 443 | 3/3/2021 |
1.1.2 | 455 | 3/3/2021 |
1.1.1 | 404 | 3/3/2021 |
1.1.0 | 452 | 3/3/2021 |
1.0.9 | 489 | 1/6/2021 |
1.0.8 | 440 | 1/5/2021 |
1.0.7 | 514 | 12/30/2020 |
1.0.6 | 571 | 9/8/2020 |
1.0.5 | 545 | 8/20/2020 |
1.0.4 | 522 | 8/20/2020 |
1.0.3 | 487 | 8/20/2020 |
1.0.2 | 510 | 8/20/2020 |
1.0.1 | 569 | 8/19/2020 |
1.0.0 | 533 | 8/17/2020 |
Property name changes