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

2Checkout Documentation

Valid

2Checkout returns both the buyer and a set of sale parameters including any custom parameters to the approved URL when the sale has been completed. This method provides a binding to validate the MD5 hash.

Method

valid

Description

Use to validate the MD5 hash on the approved URL passback.

Arguments

  • Object of passback parameters.
  • Sale Total

Returns

Returns true or false

Example Usage:

var tco = new Twocheckout({
    sellerId: "1817037",
    secretWord: "tango"
});

if (tco.response.valid(request.body), 0.01) {
    response.send("Valid");
} else {
    response.send("Invalid");
}