Files
moodle/enrol/authorize/index.php
T
ethem 9c746ce766 + New consts for authorize_action() function:
* AN_RETURNZERO: No connection was made on authorize.net.
  * AN_APPROVED: The transaction was accepted.
  * AN_DECLINED: The transaction was declined.
  * AN_REVIEW: The transaction was held for review.

+ Fix: Speacial handling for echecks: REVIEW; 'Under Review', 'Approved Review', 'Review Failed'
+ New feature: Upload a CSV file for echecks (capability: enrol/authorize:uploadcsv level: user)
+ New feature: Search payments by orderid and transid
+ New function: send_welcome_messages()

merged from 17stable.
2006-10-16 09:39:08 +00:00

45 lines
1.8 KiB
PHP

<?php // $Id$
/// Load libraries
require_once('../../config.php');
require_once('locallib.php');
/// Parameters
$orderid = optional_param('order', 0, PARAM_INT);
$courseid = optional_param('course', SITEID, PARAM_INT);
$userid = optional_param('user', 0, PARAM_INT);
/// Only site users can access to this page
require_login(); // Don't use $courseid! User may want to see old orders.
if (has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
error("Guests cannot use this page.");
}
if (! $course = get_record('course', 'id', $courseid)) {
error('Could not find that course');
}
/// Load strings. All strings should be defined here. locallib.php uses these strings.
$strs = get_strings(array('search','status','action','time','course','confirm','no','all','none','error'));
$authstrs = get_strings(array('orderid','nameoncard','echeckfirslasttname','void','capture','refund','delete',
'authcaptured','authorizedpendingcapture','capturedpendingsettle','settled',
'refunded','cancelled','expired','underreview','approvedreview','reviewfailed','tested','new',
'paymentmethod','methodcc','methodecheck',
'transid','settlementdate','notsettled','amount','unenrolstudent'), 'enrol_authorize');
/// Print header
$strpaymentmanagement = get_string('paymentmanagement', 'enrol_authorize');
print_header_simple("$strpaymentmanagement", "", "<a href=\"index.php\">$strpaymentmanagement</a>");
/// If orderid is empty, print orders
if (empty($orderid)) {
authorize_print_orders($courseid, $userid);
} else {
authorize_print_order_details($orderid);
}
/// Print footer
print_footer();
?>