34 lines
882 B
C#
Raw Normal View History

using Nethereum.Hex.HexConvertors.Extensions;
namespace TraceContract
2025-05-20 14:16:33 +02:00
{
public class Input
{
2025-05-20 14:41:33 +02:00
public string PurchaseId
{
get
{
var v = Environment.GetEnvironmentVariable("PURCHASE_ID");
if (!string.IsNullOrEmpty(v)) return v;
2025-05-20 14:16:33 +02:00
2025-05-20 14:41:33 +02:00
return
// expired:
"a7fe97dc32216aba0cbe74b87beb3f919aa116090dd5e0d48085a1a6b0080e82";
2025-05-20 14:16:33 +02:00
2025-05-20 14:41:33 +02:00
// started:
//"066df09a3a2e2587cfd577a0e96186c915b113d02b331b06e56f808494cff2b4";
}
}
public byte[] RequestId
{
get
{
var r = PurchaseId.HexToByteArray();
if (r == null || r.Length != 32) throw new ArgumentException(nameof(PurchaseId));
return r;
}
}
2025-05-20 14:41:33 +02:00
}
2025-05-20 14:16:33 +02:00
}