本文整理汇总了PHP中History::write方法的典型用法代码示例。如果您正苦于以下问题:PHP History::write方法的具体用法?PHP History::write怎么用?PHP History::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类History
的用法示例。
在下文中一共展示了History::write方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: writeHistory
private function writeHistory($response, $transactionRequest)
{
$id_pedido = (int) $this->module->currentOrder;
$id_transacao = $response->transactionId;
$id_status = (int) Configuration::get('PS_OS_BCASH_IN_PROGRESS');
$status = urldecode($response->descriptionStatus);
$paymentMethodHelper = new PaymentMethodHelper();
$pagamento_meio = $paymentMethodHelper->getById(Tools::getValue('payment-method'));
if (PaymentMethodHelper::isCard($pagamento_meio)) {
$parcelas = Tools::getValue('card-installment');
} else {
$parcelas = 1;
}
$history = new History($id_pedido, $id_transacao, $id_status, $status, $pagamento_meio->title, $parcelas);
$history->write();
}
示例2: executeCommand
private function executeCommand()
{
if ($pos = strpos(Request::factory()->getCmd(), ' ')) {
$method = substr(Request::factory()->getCmd(), 0, $pos);
$args = substr(Request::factory()->getCmd(), $pos + 1);
} else {
$method = Request::factory()->getCmd();
$args = array();
}
$command = new Controller_Command();
if (method_exists($command, $method)) {
History::write($_SESSION['login'], Request::factory()->getCmd());
return call_user_func(array($command, $method), $args);
} else {
return View::factory('tables/404');
}
}
示例3: writeHistory
private function writeHistory($orderId, $transactionId)
{
$email = Configuration::get(self::prefix . 'EMAIL');
$token = Configuration::get(self::prefix . 'TOKEN');
$consultation = new Consultation($email, $token);
$consultation->enableSandBox(Configuration::get(self::prefix . 'SANDBOX'));
try {
$response = $consultation->searchByTransaction($transactionId);
$id_pedido = $response->transacao->id_pedido;
$id_transacao = $transactionId;
$id_status = $this->getStatus($response->transacao->cod_status);
$status = $response->transacao->status;
$pagamento_meio = $response->transacao->meio_pagamento;
$parcelas = $response->transacao->parcelas;
$valor_original = $response->transacao->valor_original;
$valor_loja = $response->transacao->valor_loja;
$taxa = $valor_original - $valor_loja;
$history = new History($id_pedido, $id_transacao, $id_status, $status, $pagamento_meio, $parcelas, $valor_original, $valor_loja, $taxa);
$history->write();
} catch (ValidationException $e) {
$this->logHistoryFail($orderId, $transactionId, $statusId, $e);
} catch (ConnectionException $e) {
$this->logHistoryFail($orderId, $transactionId, $statusId, $e);
}
}
示例4: writeNewOrderStatus
static function writeNewOrderStatus($orderId, $novoStatus)
{
$oldHistory = self::getLastByOrder($orderId);
$history = new History($oldHistory['id_pedido'], $oldHistory['id_transacao'], $novoStatus['id'], $novoStatus['status'], $oldHistory['pagamento_meio'], $oldHistory['parcelas'], $oldHistory['valor_original'], $oldHistory['valor_loja'], $oldHistory['taxa']);
$history->write();
}