Expire transaction after 30 days.
This commit is contained in:
@@ -23,7 +23,7 @@ $csv = optional_param('csv', '', PARAM_ALPHA);
|
||||
$orderid = optional_param('order', 0, PARAM_INT);
|
||||
|
||||
$strs = get_strings(array('user','status','action','delete','time','course','confirm','yes','no','none','error'));
|
||||
$authstrs = get_strings(array('paymentmanagement','orderid','void','capture','refund',
|
||||
$authstrs = get_strings(array('paymentmanagement','orderid','void','capture','refund','delete',
|
||||
'authorizedpendingcapture','capturedpendingsettle','capturedsettled',
|
||||
'settled','refunded','cancelled','expired','tested',
|
||||
'transid','settlementdate','notsettled','amount',
|
||||
@@ -396,7 +396,6 @@ function authorize_csv()
|
||||
function get_order_status_desc($order)
|
||||
{
|
||||
global $CFG;
|
||||
static $timediff30;
|
||||
|
||||
$ret = new stdClass();
|
||||
|
||||
@@ -408,11 +407,10 @@ function get_order_status_desc($order)
|
||||
|
||||
switch ($order->status) {
|
||||
case AN_STATUS_AUTH:
|
||||
if (empty($timediff30)) {
|
||||
$timediff30 = getsettletime(time()) - (30 * 3600 * 24);
|
||||
}
|
||||
|
||||
$timediff30 = getsettletime(time()) - (30 * 3600 * 24);
|
||||
if (getsettletime($order->timecreated) < $timediff30) {
|
||||
$order->status = AN_STATUS_EXPIRE;
|
||||
update_record("enrol_authorize", $order);
|
||||
$ret->actions = array(ORDER_DELETE);
|
||||
$ret->status = 'expired';
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ $string['choosemethod'] = 'If you know enrolment key of the course, enter it; ot
|
||||
$string['chooseone'] = 'Fill one or both of the following two fields';
|
||||
$string['credittestwarn'] = 'Credit seems working, but no record was inserted to database in test mode';
|
||||
$string['cutofftime'] = 'Transaction Cut-Off Time. When the last transaction is picked up for settlement?';
|
||||
$string['delete'] = 'Destroy';
|
||||
$string['description'] = 'The Authorize.net module allows you to set up paid courses by merchants. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.<br /><br /><b>Note:</b> If you enter an enrolment key in the course settings, then students will also have the option to enrol using a key. This is useful if you have a mixture of paying and non-paying students.';
|
||||
$string['enrolname'] = 'Authorize.net Credit Card Gateway';
|
||||
$string['expired'] = 'Expired';
|
||||
|
||||
Reference in New Issue
Block a user