PaymentAPI 1.0.0.1
dotnet add package PaymentAPI --version 1.0.0.1
NuGet\Install-Package PaymentAPI -Version 1.0.0.1
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="PaymentAPI" Version="1.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PaymentAPI" Version="1.0.0.1" />
<PackageReference Include="PaymentAPI" />
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 PaymentAPI --version 1.0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PaymentAPI, 1.0.0.1"
#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 PaymentAPI@1.0.0.1
#: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=PaymentAPI&version=1.0.0.1
#tool nuget:?package=PaymentAPI&version=1.0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Client library for working with the payment service
Client configuration
PaymentConfig config = new PaymentConfig
{
Certificate = certificate,
ClientId = clientId,
ServerURL = serverURL,
SignKey = signKey // HMAC256 key
};
PaymentClient paymentClient = new PaymentClient(config);
Balance request
BalanceResponse balance = paymentClient.GetBalance(); // { "balance": 10000.1300 }
Initialization of payment
PaymentRequest initRequest = new PaymentRequest
{
Account = "1550555808",
OperatorCode = 5022,
Amount = 100,
ClientTranId = Guid.NewGuid().ToString(),
Currency = EnumCurrency.MDL
};
// add operator parameters
initRequest.AddParameter("paramName_1", "paramValue_1");
initRequest.AddParameter("paramName_2", "paramValue_2");
PaymentResponse initResponse = paymentClient.Init(initRequest);
Checking payment status
PaymentRequest checkRequest = new PaymentRequest
{
ClientTranId = initResponse.ClientTranId,
ServerTranId = initResponse.ServerTranId
};
PaymentResponse checkResponse = paymentClient.Check(checkRequest);
Payment confirmation
PaymentRequest confirmRequest = new PaymentRequest
{
ClientTranId = initRequest.ClientTranId,
Amount = initRequest.Amount,
CommissionAmount = initRequest.CommissionAmount,
Account = initRequest.Account,
Currency = initRequest.Currency,
OperatorCode = initRequest.OperatorCode,
ServerTranId = initResponse.ServerTranId,
PaymentsDetails = new PaymentsDetails()
{
PaymentType = initResponse.PaymentType,
Payer = initRequest.Account
}
};
PaymentResponse confirmResponse = paymentClient.Confirm(confirmRequest);
Sample of response
{
"clientTranId": "548e4671-150e-4fde-9d3e-12b9577314b6",
"serverTranId": 222636785,
"account": "1550555808",
"amount": 100,
"operatorCode": 5022,
"operatorParams": {
"paramName_1": "paramValue_1",
"paramName_2": "paramValue_2"
},
"paymentType": 1,
"paymentParams": {},
"status": "PaySuccess",
"errorCode": 0,
"errorMessage": "Success"
}
License
RUNPAY
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.5.2
- No dependencies.
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.0.0.1 | 288 | 1/11/2024 |