The MonaPay.Net API allows developers to integrate monapay wallet system into their .Net applications capable of displaying a webpage for user interactivity.
This wallet can easily be funded via User airtime balance or with any credit or debit cards. International cards can also be used.
Visit monapay for Setup.
This Library require .Net framework 4.6 or higher
Install this library from Nuget
- Olorunfemi Ajibulu - Booksrite
This project is licensed under the MIT License
- More precise intellisense
- More Documentation in this README file
Add namespaces:
- Read Documentation Here - monapay API Documentation
/// <summary>
/// Implements simple InitializePayment with full parameters
/// </summary>
private static void InitializePayment()
{
var connectionInstance = new MonapayPayment();
//var PaymentUrl = connectionInstance.GetInitializePaymentUrl(new InitializePaymentRequestModel() { amount = 30000, description = "some text", merchant_id = "merchant_id", product_key = "product_key", redirect_url = "redirect_url", uuid = "uiid", reference_id = "ref_id" });
var PaymentUrl = connectionInstance.GetInitializePaymentUrl(new InitializePaymentRequestModel() { amount = 30000, description = "some text", merchant_id = "merchant_id", product_key = "product_key", redirect_url = "redirect_url"});
Console.WriteLine(PaymentUrl);
System.Diagnostics.Process.Start(PaymentUrl);
//For Web
//Response.AddHeader("Access-Control-Allow-Origin", "*");
// Response.AppendHeader("Access-Control-Allow-Origin", "*");
//Response.Redirect(PaymentUrl); //Redirects your browser to the secure URL
}
/// <summary>
/// Payment Verification
/// </summary>
private static async void VerifyPayment()
{
var connectionInstance = new MonapayPayment("key");
var response =await connectionInstance.VerifyPayment("ref");
Console.WriteLine(JsonConvert.SerializeObject(response));
}