Рабочий код, может пригодится кому
$key = '000000000000000000000000';
$id =trim($_POST['label']);
$order =trim($_POST['operation_id']);
$payer =trim($_POST['sender']);
$odate =trim($_POST['datetime']);
$code =trim($_POST['codepro']);
$amount =trim($_POST['amount']);
$wamount =trim($_POST['withdraw_amount']);
$cur =trim($_POST['currency']);
$type =trim($_POST['notification_type']);
$hash =trim($_POST['sha1_hash']);
$hash_gen = hash("sha1", $type.'&'.$order.'&'.$amount.'&'.$cur.'&'.$odate.'&'.$payer.'&'.$code.'&'.$key.'&'.$id);
if($hash_gen!=$hash) {
file_put_contents('history.txt', 'ошибка', FILE_APPEND);
}
file_put_contents('history.txt', $amount, FILE_APPEND);