Make sure you have signed up for your Payabbhi Account and downloaded the API keys from the Portal.
.NET 4.0 and later.
From the command line:
$ nuget install Payabbhi
From Package Manager:
PM> Install-Package Payabbhi
From within Visual Studio:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on
Manage NuGet Packages
. - Click on the
Browse
tab and search forPayabbhi
. - Click on the
Payabbhi
package and clickInstall
.
Please refer to:
A typical usage of the Payabbhi .NET Library is shown below:
using Payabbhi;
// Set your credentials
Client client = new Client('<accessId>', '<secretKey>');
// Create an order
Order order = client.Order.Create(
new Dictionary<string, object>() {
{"merchant_order_id", '<merchantOrderId>'},
{"amount", 100},
{"currency", "INR"},
{"payment_auto_capture", false}
});
For more examples see the .NET API documentation
Payabbhi .NET library provides utility functions for verifying the payment signature received in the payment callback. The snippet below demonstrates a typical usage:
client.Utility.VerifyPaymentSignature(
new Dictionary<string, string>() {
{"payment_signature", '<paymentSignature>'},
{"order_id", '<orderId>'},
{"payment_id", '<paymentId>'}
});
Payabbhi .NET library provides utility functions for verifying the webhook signature. The snippet below demonstrates a typical usage:
client.Utility.VerifyWebhookSignature(payload,actualSignature,secret);
// replayInterval is optional
client.Utility.VerifyWebhookSignature(payload,actualSignature,secret,replayInterval);