From: ethem Date: Fri, 1 Sep 2006 16:43:52 +0000 (+0000) Subject: New string: paymentmethod X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0c76d7e3753008fb65cc767b1af8a76446d7213f;p=moodle.git New string: paymentmethod --- diff --git a/enrol/authorize/index.php b/enrol/authorize/index.php index 80a31ddcca..6f7a1f0592 100644 --- a/enrol/authorize/index.php +++ b/enrol/authorize/index.php @@ -18,9 +18,9 @@ /// Load strings. All strings should be defined here. locallib.php uses these strings. $strs = get_strings(array('status','action','time','course','confirm','no','all','none','error')); - $authstrs = get_strings(array('orderid','nameoncard','void','capture','refund','delete', + $authstrs = get_strings(array('orderid','nameoncard','echeckfirslasttname','void','capture','refund','delete', 'authcaptured','authorizedpendingcapture','capturedpendingsettle','capturedsettled', - 'settled','refunded','cancelled','expired','tested','new', + 'settled','refunded','cancelled','expired','tested','new','paymentmethod','methodcc','methodecheck', 'transid','settlementdate','notsettled','amount','unenrolstudent'), 'enrol_authorize'); /// Print header diff --git a/enrol/authorize/locallib.php b/enrol/authorize/locallib.php index 3d211ce49f..31c5697eff 100644 --- a/enrol/authorize/locallib.php +++ b/enrol/authorize/locallib.php @@ -197,6 +197,8 @@ function authorize_print_order_details($orderno) $settled = authorize_settled($order); $status = authorize_get_status_action($order); + $table->data[] = array("$authstrs->paymentmethod:", + ($order->paymentmethod == AN_METHOD_CC ? $authstrs->methodcc : $authstrs->methodecheck)); $table->data[] = array("$authstrs->orderid:", $orderno); $table->data[] = array("$authstrs->transid:", $order->transid); $table->data[] = array("$authstrs->amount:", "$order->currency $order->amount"); @@ -204,7 +206,12 @@ function authorize_print_order_details($orderno) $color = authorize_get_status_color($status->status); $table->data[] = array("$strs->course:", $order->shortname); $table->data[] = array("$strs->status:", "" . $authstrs->{$status->status} . ""); - $table->data[] = array("$authstrs->nameoncard:", $order->ccname); + if ($order->paymentmethod == AN_METHOD_CC) { + $table->data[] = array("$authstrs->nameoncard:", $order->ccname); + } + else { + $table->data[] = array("$authstrs->echeckfirslasttname:", $order->ccname); + } $table->data[] = array("$strs->time:", userdate($order->timecreated)); $table->data[] = array("$authstrs->settlementdate:", $settled ? userdate($order->settletime) : $authstrs->notsettled); diff --git a/lang/en_utf8/enrol_authorize.php b/lang/en_utf8/enrol_authorize.php index da24ddbe67..fbc27e8590 100644 --- a/lang/en_utf8/enrol_authorize.php +++ b/lang/en_utf8/enrol_authorize.php @@ -113,6 +113,7 @@ $string['noreturns'] = 'No returns!'; $string['notsettled'] = 'Not settled'; $string['orderid'] = 'Order ID'; $string['paymentmanagement'] = 'Payment Management'; +$string['paymentmethod'] = 'Payment Method'; $string['paymentpending'] = 'Your payment is pending for this course with this order number $a->orderid. See url\'>Order Details.'; $string['pendingordersemail'] = 'Dear admin,