I am trying to query an api according to the instructions you gave me, but I am getting this error:
(index):30 Uncaught TypeError: Cannot read properties of undefined (reading 'dataResponse') at callback ((index):30) at HTMLButtonElement.onclick ((index):23) callback @ (index):30 onclick @ (index):23
api instructions https://drive.google.com/file/d/1KHLduw46l1e3aIGCliTvn1gYuJhv8Npy/view?usp=sharing could you help me please
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<title>Duke Business School</title>
<script
data-user="user(user@test.com) "
data-password="(password 'sha256Hex')"
data-button=false
data-response=true
data-amount="100.01"
data-commerce="Affinitas"
src="http://52.22.36.22:9020/js/transactions.js">
</script>
</head>
<body>
<button onclick="callback();"> pagar</button>
</div>
</section>
<script>
function callback(data){
alert("RESPUESTA OBTENIDA EN HTML");
alert("Operación: " + data.dataResponse.description + " Autorización: " +
data.dataResponse.authorization)
}
</script>
</body>
</html>