本文整理汇总了PHP中Payment::addPayment方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::addPayment方法的具体用法?PHP Payment::addPayment怎么用?PHP Payment::addPayment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment::addPayment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Auth
$studentId = $_REQUEST['student_id'];
$auth = new Auth();
$staffId = User('STAFF_ID');
$profile = User('PROFILE');
if ($auth->checkAdmin($profile, $staffId)) {
$amount = $_REQUEST['AMOUNT'];
$comment = $_REQUEST['COMMENT'];
$mon = $_REQUEST['month_date'];
$day = $_REQUEST['day_date'];
$yr = $_REQUEST['year_date'];
$type_ = $_REQUEST['TYPE'];
$username = User('USERNAME');
$monthnames = array(1 => 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC');
$mon = array_search($mon, $monthnames);
$date_ = $mon . '/' . $day . '/' . $yr;
Payment::addPayment($amount, $type_, $studentId, $date_, $comment, $username);
}
echo '<SCRIPT language=javascript>opener.document.location = "Modules.php?modname=' . $_REQUEST['modname'] . "&student_id={$studentId}" . '"; window.close();</script>';
} else {
if ($_REQUEST['modfunc'] == 'remove') {
if (DeletePrompt(_('payment'), _('refund'))) {
include 'modules/Billing/classes/Auth.php';
include 'modules/Billing/classes/Payment.php';
$auth = new Auth();
$staffId = User('STAFF_ID');
$profile = User('PROFILE');
if ($auth->checkAdmin($profile, $staffId)) {
$Id = $_REQUEST['id'];
$username = User('USERNAME');
Payment::refundPayment($Id, $username);
}
示例2: Auth
require '../../../functions/Current.php';
require '../../../functions/PopTable.php';
require '../../../functions/DrawTab.fnc.php';
require '../../../functions/DBGet.fnc.php';
require '../../../functions/User.fnc.php';
require '../../../functions/ParseML.fnc.php';
require '../../../functions/ProgramTitle.fnc.php';
require '../classes/Auth.php';
require '../classes/Payment.php';
$auth = new Auth();
$staffId = User('STAFF_ID');
$profile = User('PROFILE');
if ($auth->checkAdmin($profile, $staffId)) {
$studentId = $_REQUEST['STUDENT_ID'];
$amount = $_REQUEST['AMOUNT'];
$comment = $_REQUEST['COMMENT'];
$mon = $_REQUEST['month_date'];
$day = $_REQUEST['day_date'];
$yr = $_REQUEST['year_date'];
$type_ = $_REQUEST['TYPE'];
$monthnames = array(1 => 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC');
$mon = array_search($mon, $monthnames);
$date_ = $mon . '/' . $day . '/' . $yr;
if (Payment::addPayment($amount, $type_, $studentId, $date_, $comment)) {
echo '{"result":[{"success":true}]}';
} else {
echo '{"result":[{"success":false}]}';
}
} else {
echo '{"result":[{"success":false}]}';
}
示例3: loadLib
<?php
//Component Payment
loadLib('payment');
loadLib('clinic');
//loadJS('payment.js','payment');
//loadCSS('payment.css','payment');
switch (getVar('task')) {
case 'add_payment':
//check if the user has rights to add a payment
if (current_user_can('add_payment')) {
Payment::addPayment(getVar('patient_id'), getVar('clinic'), getVar('practitioner_id'), getVar('description'), getVar('amount'));
error_log("Adding the payment", 0);
setResponse('Payment Registered... !!');
}
break;
case 'get_clinics':
//get the clinics to use in the payment
echo $clinics = json_encode(Clinic::getClinics());
break;
case 'get_fees':
echo $fees = json_encode(Payment::getFees());
break;
case 'get_users':
echo $users = json_encode(get_users('role=practitioner'));
break;
}
switch (getView()) {
case 'list':
//get all the payments from the clinics
$payments = Payment::getAllPayments();