" dynamic="no"} Language Libraries | Developer Documentation | 2Checkout
Language

2Checkout Documentation

Valid

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 Notifications area in your account. This method provides a binding to validate the MD5 hash.

Method

valid

Description

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");
}