You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also I have a build of RazorPay SDK working with .NET Core 3.0, if you want then I can share it with you the dll.
The documentation of .NET API is not complete so, I want to contribute a Transfer API example to your docs, please find it below:
var payment = _client.Payment.Fetch("PAYMENT_ID");
try{
Dictionary<string, object> transfers = new Dictionary<string, object>();
//Converting to UNIX Timestamp for Account Hold.
DateTime temp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
var unixTimeStamp = (long)(DateTime.UtcNow.AddDays(1).Subtract(temp)).TotalSeconds;
//Transfer Options
Dictionary<string, object> options = new Dictionary<string, object>();
options.Add("amount", 100);
options.Add("currency", "INR");
options.Add("account", "ACCOUNT_ID");
//If you want to hold the account transfer
options.Add("on_hold", 1);
//If you want to hold the account transfer to specific DateTime
options.Add("on_hold_until", unixTimeStamp);
//Transfer List
List<Dictionary<string, object>> transferList = new List<Dictionary<string, object>>();
transferList.Add(options);
//Creating Object to pass as "data" in Payment.Transfer(Dictionary<string, object> data)
transfers.Add("transfers", transferList);
// List<Transfer>
var transferResult = payment.Transfer(transfers);
var transferId = transferResult[0]["id"];
} catch {
//Write To Console
}
The text was updated successfully, but these errors were encountered:
Hello,
Also I have a build of RazorPay SDK working with .NET Core 3.0, if you want then I can share it with you the dll.
The documentation of .NET API is not complete so, I want to contribute a Transfer API example to your docs, please find it below:
The text was updated successfully, but these errors were encountered: