Xente.net.Client
1.0.0.3
dotnet add package Xente.net.Client --version 1.0.0.3
NuGet\Install-Package Xente.net.Client -Version 1.0.0.3
<PackageReference Include="Xente.net.Client" Version="1.0.0.3" />
<PackageVersion Include="Xente.net.Client" Version="1.0.0.3" />
<PackageReference Include="Xente.net.Client" />
paket add Xente.net.Client --version 1.0.0.3
#r "nuget: Xente.net.Client, 1.0.0.3"
#:package Xente.net.Client@1.0.0.3
#addin nuget:?package=Xente.net.Client&version=1.0.0.3
#tool nuget:?package=Xente.net.Client&version=1.0.0.3
Xente Payment Library
A .NET library for integrating payment services into your application using Xente's API. This library provides a simple and flexible way to process payments using a fluent builder pattern.
Installation
Install via NuGet Package Manager:
Install-Package dotnet add package Xente.net.Client
Features
- Sandbox and Production API support
- Configurable timeout settings
- Fluent builder pattern for easy payment requests
- Async payment processing
- Payment status tracking
Usage
Basic Configuration
var config = new PaymentConfiguration.Builder()
.UseApi(Api.Sandbox)
.WithAppKey("YOUR_APP_KEY")
.WithAppPassword("YOUR_APP_PASSWORD")
.WithUserId("YOUR_USER_ID")
.WithTimeout(TimeSpan.FromSeconds(45))
.Build();
// Initialize the payment service
var paymentService = new PaymentService(config);
var paymentRequestBuilder = new PaymentRequestBuilder(paymentService);
// Create a payment request
var paymentResponse = await paymentRequestBuilder
.WithRequestId(Guid.NewGuid().ToString())
.WithAmount(500)
.ForPhone("PHONE_NUMBER")
.WithMemo("Payment Description")
.RequestPaymentAsync();
// Check payment status
var status = paymentResponse.Result.PaymentStatus;
Configuration Options
| Option | Description | Required |
|---|---|---|
Api |
Sandbox or Production environment | Yes |
AppKey |
Your application key | Yes |
AppPassword |
Your application password | Yes |
UserId |
Your user ID | Yes |
Timeout |
Request timeout duration | No (defaults to 45 seconds) |
Example with Exception Handling
try
{
var paymentRequest = await paymentRequestBuilder
.WithRequestId(requestId)
.WithAmount(amount)
.ForPhone(phoneNumber)
.WithMemo(memo)
.RequestPaymentAsync();
}
catch (PaymentException ex)
{
// Handle payment-specific exceptions
}
catch (Exception ex)
{
// Handle general exceptions
}
Best Practices
- Always generate a unique
RequestId - Store the
RequestIdfor reconciliation - Use
try-catchblocks to handle exceptions - Keep sensitive credentials secure
- Test thoroughly in the sandbox environment before going live
Environment Support
- .NET Standard 2.0+
- .NET Core 3.1+
- .NET 5.0+
- .NET 6.0+
Support
For issues, feature requests, or questions, please create an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Security
Never commit sensitive data like API keys, passwords, or user IDs. Always use secure configuration management in your production environment.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- Xente.net (>= 1.0.0)
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 |
|---|