Paystack.Net.SDK 1.3.3

.Net Plugin for Paystack

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.3
dotnet add package Paystack.Net.SDK --version 1.3.3
paket add Paystack.Net.SDK --version 1.3.3
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.

Version History

Version Downloads Last updated
1.3.3 66 10/25/2018
1.3.2 51 10/15/2018
1.3.0 76 8/31/2018
1.2.0 153 5/8/2018
1.1.0 214 12/31/2017
1.0.2 203 12/27/2017
1.0.1-alpha 132 12/26/2017
1.0.0 158 12/26/2017
1.0.0-alpha 97 12/25/2017