Zone.FundsTransfer.Net
0.0.1
See the version list below for details.
dotnet add package Zone.FundsTransfer.Net --version 0.0.1
NuGet\Install-Package Zone.FundsTransfer.Net -Version 0.0.1
<PackageReference Include="Zone.FundsTransfer.Net" Version="0.0.1" />
paket add Zone.FundsTransfer.Net --version 0.0.1
#r "nuget: Zone.FundsTransfer.Net, 0.0.1"
// Install Zone.FundsTransfer.Net as a Cake Addin #addin nuget:?package=Zone.FundsTransfer.Net&version=0.0.1 // Install Zone.FundsTransfer.Net as a Cake Tool #tool nuget:?package=Zone.FundsTransfer.Net&version=0.0.1
Zone Funds Transfer Library for .NET/C#
======================
Project Description
A .NET implementation for signing funds transfer transactions using your own Private key
Download & Install
Nuget Package Zone.FundsTransfer.Net
Install-Package Zone.FundsTransfer.Net
Getting Started
To get started, simply create a new ZoneFundsTransferClient
object as shown below:
<a id='snippet-zonefundstransferclient'></a>
var client = new ZoneFundsTransferClient(new Config
{
ApiUrl = "https://devagency.appzonegroup.com",
PrivateKey = "0x23945c3e52558d9121c2549e8782f1ac7f3703e07a2926d03c412f14fde73528"
});
SignTransaction
<a id='snippet-signTransaction'></a>
var fundsTransferPayload = await client.SignTransaction(100, "test funds", "benny wright", "1234567890", "400", "13322917118374945681", "12334", "NGN");
The fundsTransferPayload
object returned will have similar values to the following JSON object:
{
"payload": {
"BeneficiaryBankCode": "400",
"BeneficiaryAccountName": "benny wright",
"BeneficiaryAccountNo": "3243017687",
"Narration": "test funds",
"Currency": "NGN",
"Reference": "12334",
"SwitchTrxnRef": "13322920407804021482",
"Amount": 100,
"NameInquiryRef": "13322917118374945681"
},
"signedTransaction":"0xbhwiwe23823nbnnska923239dw223023aa00002300",
"payloadSignature": "0xbhwiwe23823nbnnska923239dw223023aa00002300"
}
Calculating Payload Signature
The funds transfer request must contain a Payload-Signature
field in the body used to ensure request integrity.
It has to be created using HMAC-SHA-256 (RFC 2104) encoding, the payload is made of the entire JSON Payload values and the secret key used is the Transaction Signature
Note:
The Payload-Signature
value is case sensitive and must be sent in lower case.
Example
using System;
using System.Text;
using System.Security.Cryptography;
string payload = $"{amount}{narration}{receiverAccountName}{receiverAccountNo}{bankCode}{transactionReference}";
string secretKey = signedTransaction;
byte[] keyByte = new ASCIIEncoding().GetBytes(secretKey);
byte[] payloadBytes = new ASCIIEncoding().GetBytes(payload);
byte[] hashmessage = new HMACSHA256(keyByte).ComputeHash(payloadBytes);
string payloadSignature = BitConverter.ToString(hashmessage).Replace("-", "").ToLower();
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. |
-
.NETStandard 2.1
- Nethereum.Besu (>= 4.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.