using System.Security.Cryptography;
public static void Main()
String Timestamp = "1611232922428";
String Nonce = "5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA";
String Body = "{\"merchantId\":\"98765987\",\"subMerchantId\":\"98765987\",\"merchantTradeNo\":\"9825382937292\",\"totalFee\":25.17,\"productDetail\":\"Greentea ice cream cone\",\"currency\":\"BUSD\",\"returnUrl\":\"\",\"tradeType\":\"APP\",\"productType\":\"Food\",\"productName\":\"Ice Cream\"}";
String Payload = (Timestamp + "\n" + Nonce + "\n" + Body + "\n");
String SecretKey = "uahr4nhailyq55yubuhuncnprfac73bcbz2qfafsevic1jruwunioxtoaozy122f";
HMACSHA512 HMAC = new HMACSHA512(Encoding.UTF8.GetBytes(SecretKey));
String Signature = BitConverter.ToString(HMAC.ComputeHash(Encoding.UTF8.GetBytes(Payload))).Replace("-","");
Console.WriteLine("Signature: " + Signature);