Validar Webhook
Para asegurar que el webhook es de Wompi es necesario validarlo, en esta documento se muestra como.
Validar con Hash
Ejemplos
private static string EncriptarData(string body, string secret)
{
UTF8Encoding encoding = new UTF8Encoding();
var hash = new HMACSHA256(encoding.GetBytes(secret));
byte[] stream = hash.ComputeHash(encoding.GetBytes(body));
string textHash = string.Concat(stream.Select(b => b.ToString("x2")));
hash.Dispose();
return textHash;
}Validar Consultando Transacción
Last updated