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

2Checkout Documentation

Check

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. The check method in the Twocheckout_Return class provides a binding to validate the MD5 hash.

Methods

  • check: Validates the MD5 hash.

check

Use to validate the MD5 hash.

Arguments

  • array Parameters
    • An array of the returned parameters.
  • string secret word

    • Secret Word used to validate MD5 hash (Set on Site Management page)

Returns

Returns the result of the hash check.

Example Usage:

$params = array();
foreach ($_REQUEST as $k => $v) {
    $params[$k] = $v;
}

$passback = Twocheckout_Return::check($params, "tango");

Example Response:

Array
(
    [response_code] => Success
    [response_message] => Hash Matched
)