ANTapPayment 1.0.3
dotnet add package ANTapPayment --version 1.0.3
NuGet\Install-Package ANTapPayment -Version 1.0.3
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="ANTapPayment" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ANTapPayment --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ANTapPayment, 1.0.3"
#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.
// Install ANTapPayment as a Cake Addin
#addin nuget:?package=ANTapPayment&version=1.0.3
// Install ANTapPayment as a Cake Tool
#tool nuget:?package=ANTapPayment&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ANTapPayment
this is a warpaer for TAP payment api , package will handel most of the hard work
Github
https://github.com/aalnjjar/ANTapPayment
Installing / Getting Started
- Install the package from nuguet
configure app in startup.cs
- defining your api configration
ApiConfiguration apiConfiguration = new ApiConfiguration()
{
BaseUrlLive = "", // your api live base url
BaseUrlStaging = "", // your staging base url
Company = "ahmed alnjjar", // your company name
Mode = Mode.Staging, // server mode will be used for redirection
PostEndPoint = "/api/endpoint", // post end point charge request will be redirected to this end point
RedirectEndPoint = "/api/end/point", // redirect url
TapSecretKeyLive = "", // tap secret key for live environment
TapSecretKeyStaging = "" // tap secret key for staging
};
- if you want to use the charge apis add the following to your startup.cs
services.AddTransient<IPaymentRequest, PaymentRequest>(func => new PaymentRequest(apiConfiguration));
- if you want to use the refund apis add the following to your startup
services.AddTransient<IRefundRequest, RefundRequest>(func => new RefundRequest(apiConfiguration));
creating your first charge request
private readonly IPaymentRequest _paymentRequest;
public YourRepository(IPaymentRequest paymentRequest)
{
_paymentRequest = paymentRequest;
}
public async Task<dynamic> YourFunction(string token)
{
/// <summary>
/// payment source
/// For credit card ==> send generated token from front end
/// For KNET ==> src_kw.knet
/// For Mada ==> src_sa.mada
/// For Benifit ==> src_bh.benefit
/// For Fawray ==> src_eg.fawry
/// For Oman net ==> src_om.omannet
/// </summary>
var response = await _paymentRequest.Create(new ANTapPayment.Models.PaymentRequestModel
{
AmountToPay = 100.000,
CurrencyISO = "KWD",
CustomerEmail = clientEmail,
CustomerFirstName = clientFName,
CustomerLastName = clientLName,
CustomerPhoneCountryCode = "965",
CustomerPhoneNumber = clientPhone,
OrderId = Guid.NewGuid().ToString(),
PaymentMerchent = "",
PaymentDescription = "test payment",
PaymentSource = token,
TransactionId = Guid.NewGuid().ToString(),
Language="AR"
});
return response;
}
response will be
public bool IsSuccess { get; set; }
public string JsonResponse { get; set; }
public ChargeReponse SucsessResponse { get; set; } ==>
public TapErrorResponse FailureResponse { get; set; }
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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
fix some bugs