This package is just ported version of official RazorPay to also support .NET Core
For Official Documentaion
https://github.com/razorpay/razorpay-dot-net
https://razorpay.com/docs/server-integration/dot-net/
=================
Razorpay client .NET Api. The api follows the following practices
- Namespaced under Razorpay.Api .
- Client throws exceptions instead of returning errors.
- Options are passed as Dictionary instead of multiple arguments wherever possible.
- All request and responses are communicated over JSON.
- A minimum of .Net 4.0 is required.
If you are using nuget package manager:
RazorpayClient client = new RazorpayClient(key, secret);
OR
RazorpayClient client = new RazorpayClient(baseUrl, key, secret);
Dictionary<string, object> options = new Dictionary<string,object>();
options.Add("from", startTime); // start time is a unix timestamp, you can get unix timestamp using // Utils.ToUnixTimestamp method
List<Payment> payments = client.Payment.All(options);
Payment payment = client.Payment.Fetch(id);
Dictionary<string, object> options = new Dictionary<string,object>();
options.Add("amount", amountToBeCaptured);
Payment payment = payment.Capture(options);
Refund refund = payment.createRefund();
List<Refund> refunds = payment.getAllRefunds();
Refund refund = payment.fetchRefund(id);
paymentAmount = payment["amount"];
Dictionary<string, object> options = new Dictionary<string,object>();
options.Add("amount", TransactionAmount);
options.Add("currency", "INR");
options.Add("receipt", "MerchantTransactionId");
options.Add("payment_capture", 1);
Order order = Order.Create(options);
Dictionary<string, object> options = new Dictionary<string,object>();
options.Add("name", "customer name");
options.Add("contact", "9999999999");
options.Add("email", "foo@example.com");
options.Add("fail_existing", 0);
Customer customer = Customer.Create(options);
=================