本文整理汇总了PHP中api::updateSession方法的典型用法代码示例。如果您正苦于以下问题:PHP api::updateSession方法的具体用法?PHP api::updateSession怎么用?PHP api::updateSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api
的用法示例。
在下文中一共展示了api::updateSession方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
case 0:
//validate pin
$pin = $call->validatePIN($code);
// echo '<br/>'. md5((int)trim($code))."<<<";
if ($pin === false) {
$attempts = $call->loginAttempts($string->cell);
if ($attempts > 3) {
$feedback = array('code' => 1, 'msg' => "Invalid Pin Please Try Again! \n\r" . ($attempts - 3) . " Attempts left.");
} else {
$feedback = array('code' => 0, 'msg' => "Too many invalid attempt \n\r Account blocked");
}
} else {
$info = $call->getSession($string->cell);
$feedback = array('code' => 1, 'msg' => "Please confirm you want to pay \n N\$ {$info['amount']} \n To Taxi#: {$info['taxi_id']}? \n\r 1. Yes \n\r 2. No");
// update session
$call->updateSession($string->cell);
}
break;
case 1:
//process trans
switch ($code) {
case '1':
// transfer
$info = $call->executeTransacton($string->cell);
if ($info) {
$feedback = array('code' => 0, 'msg' => "You have successfuly paid \n\r N\$ " . $info['amount'] . "\n\r Seat No: " . $info['seats'] . "\n\r To Taxi #: " . $info['taxi_id']);
} else {
$feedback = array('code' => 0, 'msg' => "Oops sorry, an error occured\n\r");
//var_dump(DB::DBi()->errorInfo());
$call->deleteSession($string->cell);
}