<?php

$amount=$payment->pay_samount;
$id=$payment->pay_transid;  

# get the user details
$result = mysql_query("SELECT * FROM members WHERE mem_userid=$Sess_UserId",$link);
$arr_member = mysql_fetch_object($result);
$testdate=date("Y-m-d");
if ($arr_member->mem_expiredate < $testdate) {
    $Sess_Userlevel="silver";
} else {
    $Sess_Userlevel="gold";
}
switch ($payment->pay_transstatus) {
    case 'Completed':
        $response=sprintf(THANKYOU_COMPLETED,$id,$amount,$arr_member->mem_expiredate);
        break;
    case 'Pending':
        $response=sprintf(THANKYOU_PENDING,$id,$amount,$arr_member->mem_expiredate);
        break;
    case 'Failed':
        $response=THANKYOU_FAILED;
        break;
    case 'Denied':
        $response=THANKYOU_DENIED;
        break;
}
?>
<?=$response?>
