Skip to content

Notification_Check

Jacob McConnell edited this page Jun 10, 2014 · 3 revisions

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

##Method

##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 ($_POST as $k => $v) {
    $params[$k] = $v;
}

$result = Twocheckout_Notification::check($params, 'tango');

####Example Response:

Array
(
    [response_code] => Success
    [response_message] => Hash Matched
)
Clone this wiki locally