當前位置: 首頁>>代碼示例>>PHP>>正文


PHP History::write方法代碼示例

本文整理匯總了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();
 }
開發者ID:payu-br,項目名稱:bcash-prestashop-transparente,代碼行數:16,代碼來源:validation.php

示例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');
     }
 }
開發者ID:xingcuntian,項目名稱:readmin,代碼行數:17,代碼來源:Index.php

示例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);
     }
 }
開發者ID:payu-br,項目名稱:bcash-prestashop-transparente,代碼行數:25,代碼來源:notification.php

示例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();
 }
開發者ID:payu-br,項目名稱:bcash-prestashop-transparente,代碼行數:6,代碼來源:History.php


注:本文中的History::write方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。