<?php
$sql = "SELECT dwolla_key,dwolla_secretkey FROM ".$tableprefix."settings ";
$key        = $row["dwolla_key"];
$secret     = trim($row["dwolla_secretkey"]);

function verifyGatewaySignature($proposedSignature, $checkoutId, $amount) {
    global $secret;
    $amount = number_format($amount, 2);
    $signature = hash_hmac("sha1", "{$checkoutId}&{$amount}", $secret);
    return $signature == $proposedSignature;
}