本文整理汇总了PHP中Payment::cancelSessions方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::cancelSessions方法的具体用法?PHP Payment::cancelSessions怎么用?PHP Payment::cancelSessions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment::cancelSessions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
if (isset($_POST['payNewBillPayment'])) {
$payment = new Payment();
$payment->cancelSessions();
unset($_POST['payNewBillPayment']);
}
$accounts = new Accounts();
$accounts->userID = $_SESSION['userID'];
$_SESSION['accounts'] = $accounts->getAccounts();
$billers = new Billers();
$billers->userID = $_SESSION['userID'];
$_SESSION['billers'] = $billers->getBillers();
}
示例2: init
public function init()
{
$payment = new Payment();
$payment->cancelSessions();
if (isset($_SESSION['billPayee']) || isset($_SESSION['billPayeeList'])) {
$billers = new BillerPayees();
$billers->userID = $_SESSION['userID'];
$_SESSION['payeeList'] = $billers->getBillersList();
} elseif (isset($_SESSION['fundsTransferPayee']) || isset($_SESSION['fundsTransferPayeeList'])) {
$payees = new BillerPayees();
$payees->userID = $_SESSION['userID'];
$_SESSION['payeeList'] = $payees->getPayeesList();
} elseif (isset($_SESSION['allPayeeList'])) {
$both = new BillerPayees();
$both->userID = $_SESSION['userID'];
$_SESSION['payeeList'] = $both->getBothList();
}
}
示例3: searchResults
public function searchResults($search)
{
$payment = new Payment();
$payment->cancelSessions();
$billerPayees = new BillerPayees();
$billerPayees->userID = $_SESSION['userID'];
switch ($search['paymentType']) {
case 'All Payment Types':
$_SESSION['allPaymentList'] = 'selected="selected"';
$_SESSION['payees'] = $billerPayees->getBoth();
unset($_SESSION['billPaymentList']);
unset($_SESSION['fundsTransferPaymentList']);
break;
case 'Bill Payment':
unset($_SESSION['allPaymentList']);
$_SESSION['billPaymentList'] = 'selected="selected"';
$_SESSION['payees'] = $billerPayees->getBillers();
unset($_SESSION['fundsTransferPaymentList']);
break;
case 'Funds Transfer':
unset($_SESSION['allPaymentList']);
unset($_SESSION['billPaymentList']);
$_SESSION['fundsTransferPaymentList'] = 'selected="selected"';
$_SESSION['payees'] = $billerPayees->getPayees();
break;
}
$accounts = new Accounts();
$accounts->userID = $_SESSION['userID'];
$_SESSION['accounts'] = $accounts->getAccounts();
$_SESSION['accountID'] = $search['accountID'];
$this->setAccountSelected($_SESSION['accountID']);
$_SESSION['payListName'] = $search['payListName'];
$_SESSION['payListStatus'] = $search['payListStatus'];
$_SESSION['payListFromAmount'] = $search['payListFromAmount'];
$_SESSION['payListToAmount'] = $search['payListToAmount'];
$_SESSION['payListFromDate'] = $search['payListFromDate'];
$_SESSION['payListToDate'] = $search['payListToDate'];
$this->getPayments();
}
示例4: display
public function display()
{
if (isset($_POST['next'])) {
unset($_POST['next']);
// To prevent unwarranted use of browser back button.
if (!isset($_SESSION['payAccountID'])) {
header('Location: New-Bill-Payment');
}
// Process on submission of password.
if (isset($_POST['password'])) {
$validate = new Validation();
// Validate the password.
try {
$validate->password($_POST['password']);
} catch (ValidationException $e) {
$_SESSION['error'] = $e->getError();
}
if (isset($_SESSION['error'])) {
unset($_POST['password']);
header('Location: Bill-Payment-Amount');
} else {
$user = new Users();
$user->userID = $_SESSION['userID'];
$user->password = $_POST['password'];
unset($_POST['password']);
// Check for a password match.
try {
$user->confirmPassword();
} catch (ValidationException $e) {
$_SESSION['error'] = $e->getError();
}
if (isset($_SESSION['error'])) {
header('Location: Bill-Payment-Amount');
} else {
// Process the payment.
$account = new Account();
$account->accountID = $_SESSION['payAccountID'];
if ($account->processPayment()) {
// Display the Acknowledgement Page.
$paymentack = new Paymentack();
$paymentack->init();
include 'view/layout/paymentack.php';
unset($_SESSION['payCreated']);
unset($_SESSION['payDate']);
unset($_SESSION['payAccountID']);
unset($_SESSION['payAmount']);
unset($_SESSION['payStatus']);
unset($_SESSION['payConf']);
unset($_SESSION['payAccount']);
unset($_SESSION['payBillerCode']);
unset($_SESSION['payBillerName']);
unset($_SESSION['payBillerNickname']);
unset($_SESSION['payCustomerRef']);
} else {
// Display the Payment Confirmation Page.
$paymentconf = new Paymentconf();
$paymentconf->init();
include 'view/layout/paymentconf.php';
}
}
}
}
// Cancel the Payment
} else {
if (isset($_POST['cancel'])) {
unset($_POST['cancel']);
$payment = new Payment();
$payment->cancelSessions();
// Return to the Payment Page.
$payment->init();
include 'view/layout/payment.php';
} else {
// For any other reason, return to the Payment page.
$payment = new Payment();
$payment->init();
include 'view/layout/payment.php';
}
}
}
示例5: display
public function display()
{
// Process if posted to from the Payment Amount Page.
if (isset($_POST['next'])) {
unset($_POST['next']);
// In the event the back button is hit on the browser
// after the transaction has been processed.
if (!isset($_SESSION['payBillerCode']) || !isset($_SESSION['payBillerName']) || !isset($_SESSION['payBillerNickname'])) {
header("Location: New-Bill-Payment");
}
if (isset($_POST['account'])) {
$_SESSION['payAccountID'] = $_POST['account'];
unset($_POST['account']);
}
$validate = new Validation();
if (isset($_POST['custref'])) {
// Validate the customer reference.
try {
$custref = $_POST['custref'];
unset($_POST['custref']);
$validate->custref($custref);
} catch (ValidationException $e) {
$_SESSION['error'] = $e->getError();
}
if (isset($_SESSION['error'])) {
$custref = null;
unset($_POST['next']);
header('Location: Bill-Payment-Amount');
} else {
$_SESSION['payCustomerRef'] = $custref;
if (isset($_POST['amount'])) {
// Validate the amount.
try {
$amount = $_POST['amount'];
unset($_POST['amount']);
$validate->payAmount($amount);
} catch (ValidationException $e) {
$_SESSION['error'] = $e->getError();
}
if (isset($_SESSION['error'])) {
$amount = null;
unset($_POST['next']);
header('Location: Bill-Payment-Amount');
} else {
$_SESSION['payAmount'] = $amount;
if (isset($_POST['paymentDate'])) {
// Validate the date.
try {
$paymentDate = $_POST['paymentDate'];
unset($_POST['paymentDate']);
$validate->payDate($paymentDate);
} catch (ValidationException $e) {
$_SESSION['error'] = $e->getError();
}
if (isset($_SESSION['error'])) {
$paymentDate = null;
unset($_POST['next']);
header('Location: Bill-Payment-Amount');
} else {
// If all is OK, display the Payment Confirmation Page.
$_SESSION['payDate'] = $paymentDate;
$paymentconf = new Paymentconf();
$paymentconf->init();
include 'view/layout/paymentconf.php';
}
}
}
}
}
}
// Cancel the Payment
} else {
if (isset($_POST['cancel'])) {
unset($_POST['cancel']);
$payment = new Payment();
$payment->cancelSessions();
$payment->init();
include 'view/layout/payment.php';
} else {
// For any other reason, display the Payment Page.
$payment = new Payment();
$payment->cancelSessions();
$payment->init();
}
}
}