Paystack.Net.SDK 1.3.7

The Paystack .Net SDK addresses the essential needs to collect money on Nigeria Leading Payment Platform
called Paystack. Frequent and up-to-date releases.

Install-Package Paystack.Net.SDK -Version 1.3.7
dotnet add package Paystack.Net.SDK --version 1.3.7
<PackageReference Include="Paystack.Net.SDK" Version="1.3.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Paystack.Net.SDK --version 1.3.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

New Feature

The version now includes paystack charges. This is important if you want the customer to bear the charge in addition to the product or services cost.

This is based on Ibrahim Lawal's Gists here

####Usage
To calculate the total amount with charge.

  var amountWithCharges = Paystack.Net.SDK.Fees.ChargeHelper.AddCharge(500000);

Get the calculated amount should you want to display it to the customer before payment

 var amt = Paystack.Net.SDK.Fees.ChargeHelper.CalculatedCharge(500000);

Sample web Application

Check out the sample web Application

Usage

Transactions

First, Instantiate PaystackTransactionAPI:
Add required using

using Paystack.Net.SDK.Transactions;

Transaction Initialization
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.InitializeTransaction("customer@gmail.com", 500000);
if(response.status){
     .....
}
Transaction Verification
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.VerifyTransaction("cipyd2ikxw");
Transaction Listings
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.ListTransactions();
Fetch Transaction
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.FetchTransaction(9149218);
Charge Authorization
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.ChargeAuthorization("AUTH_lqnf8xjy5j", "mark2kk@gmail.com", 5000);
View Transaction Timeline
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.TransactionTimeline("cipyd2ikxw");
Customers

Requires using Paystack.Net.SDK.Customers namespace and an instance of PaystackCustomers

Create Customer
 var paystackCustomerAPI = new PaystackCustomers(YOUR_SECRET_KEY_HERE);
 var response = await paystackCustomerAPI.CreateCustomer("person@live.com", "John", "Doe", "08098786543");
List Customers
 var paystackCustomerAPI = new PaystackCustomers(YOUR_SECRET_KEY_HERE);
 var response = await paystackCustomerAPI.ListCustomers();

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Still on the roadmap

  • Invoices
  • etc

New Feature

The version now includes paystack charges. This is important if you want the customer to bear the charge in addition to the product or services cost.

This is based on Ibrahim Lawal's Gists here

####Usage
To calculate the total amount with charge.

  var amountWithCharges = Paystack.Net.SDK.Fees.ChargeHelper.AddCharge(500000);

Get the calculated amount should you want to display it to the customer before payment

 var amt = Paystack.Net.SDK.Fees.ChargeHelper.CalculatedCharge(500000);

Sample web Application

Check out the sample web Application

Usage

Transactions

First, Instantiate PaystackTransactionAPI:
Add required using

using Paystack.Net.SDK.Transactions;

Transaction Initialization
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.InitializeTransaction("customer@gmail.com", 500000);
if(response.status){
     .....
}
Transaction Verification
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.VerifyTransaction("cipyd2ikxw");
Transaction Listings
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.ListTransactions();
Fetch Transaction
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.FetchTransaction(9149218);
Charge Authorization
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.ChargeAuthorization("AUTH_lqnf8xjy5j", "mark2kk@gmail.com", 5000);
View Transaction Timeline
var paystackTransactionAPI = new PaystackTransaction(YOUR_SECRET_KEY_HERE);
var response = await paystackTransactionAPI.TransactionTimeline("cipyd2ikxw");
Customers

Requires using Paystack.Net.SDK.Customers namespace and an instance of PaystackCustomers

Create Customer
 var paystackCustomerAPI = new PaystackCustomers(YOUR_SECRET_KEY_HERE);
 var response = await paystackCustomerAPI.CreateCustomer("person@live.com", "John", "Doe", "08098786543");
List Customers
 var paystackCustomerAPI = new PaystackCustomers(YOUR_SECRET_KEY_HERE);
 var response = await paystackCustomerAPI.ListCustomers();

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Still on the roadmap

  • Invoices
  • etc

Release Notes

This package required .Net framework 4.6. This realese includes fees.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.3.7 211 5/24/2019
1.3.6 248 1/18/2019
1.3.3 216 10/25/2018
1.3.2 145 10/15/2018
1.3.0 211 8/31/2018
1.2.0 383 5/8/2018
1.1.0 377 12/31/2017
1.0.2 456 12/27/2017
1.0.1-alpha 291 12/26/2017
1.0.0 337 12/26/2017
1.0.0-alpha 235 12/25/2017