Notification_Valid - 2Checkout/2checkout-node GitHub Wiki
2Checkout's Instant Notification Service passes messages for each sale event such as a recurring billing success or decline to a URL you specify for each message type under the Notifcations area in your account. This method provides a binding to validate the MD5 hash.
##Method
##valid
Use to validate the MD5 hash on INS notifications.
####Arguments
- Object of Notification Parameters
####Returns
Returns true or false
####Example Usage:
var tco = new Twocheckout({
sellerId: "1817037",
secretWord: "tango"
});
if (tco.notification.valid(request.body)) {
response.send("Valid");
} else {
response.send("Invalid");
}