Exemplo n.º 1
0
        }// end of paid info  (end of confirmation page)
    }// end of flag
}//   ----------------------end of if



echo $OUTPUT->header();
require_login();
$trans->student_tabview($currenttab);
$usercontext = context_user::instance($USER->id);

//If the loggedin user have the required capability allow the page
//if (!has_capability('local/clclasses:enrollclass', $usercontext)) {
//print_error('You dont have permissions');
//}
$trans = onlinepay_transaction::getInstance();

$PAGE->requires->js('/local/onlinepayment/check_total.js');
//----------manage_dept heading------------------------
echo $OUTPUT->heading(get_string('onlinepay_heading', 'local_onlinepayment'));

echo $OUTPUT->box(get_string('make_payment', 'local_onlinepayment'));
try {
// only accounting period only transactiuon takes place
    $school = $DB->get_record('local_userdata', array('userid' => $USER->id));
    if (empty($school)) {
        $e = get_string('notenrolled_school', 'local_onlinepayment');
        throw new Exception($e);
    }
    $date = date_create();
    $unixtime = date_timestamp_get($date); // current date unix time
Exemplo n.º 2
0
 public static function getInstance() {
     if (!self::$_singleton) {
         self::$_singleton = new onlinepay_transaction();
     }
     return self::$_singleton;
 }