• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Am_Request类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Am_Request的典型用法代码示例。如果您正苦于以下问题:PHP Am_Request类的具体用法?PHP Am_Request怎么用?PHP Am_Request使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Am_Request类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     list($action, $status, $id) = explode("-", $request->getActionName());
     if ($action != 'status') {
         if ($action != 'ipn' && $action != 'thanks' || $request->get('transaction_status') == 'SETTLED') {
             parent::directAction($request, $response, $invokeArgs);
         }
         return;
     }
     if (!in_array($status, array('return', 'ok', 'fail'))) {
         throw new Am_Exception_InternalError("Bad status-request {$status}");
     }
     if (!$id) {
         throw new Am_Exception_InternalError("Invoice ID is absent");
     }
     if (!($this->invoice = $this->getDi()->invoiceTable->findFirstByPublicId($id))) {
         throw new Am_Exception_InternalError("Invoice not found by id [{$id}]");
     }
     switch ($status) {
         case 'return':
             $url = $request->get('transactionStatus') == 'REJECTED' ? $this->getCancelUrl() : $this->getReturnUrl();
             break;
         case 'ok':
             $url = $this->getReturnUrl();
             break;
         case 'fail':
             $url = $this->getCancelUrl();
             break;
     }
     $response->setRedirect($url);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:31,代码来源:paymento.php


示例2: checkPermissions

 /**
  * Throws exception if no permissions added
  * @param Am_Request $request
  * @param array $record 
  */
 public function checkPermissions(Am_Request $request, $alias, $method)
 {
     if ($this->getDi()->config->get('api_debug_mode')) {
         $this->getDi()->errorLogTable->log('REST API :' . var_export($request->getParams(), true));
     }
     $event = $this->getDi()->hook->call(Am_Event::API_CHECK_PERMISSIONS, array('request' => $request, 'alias' => $alias, 'method' => $method));
     foreach ($event->getReturn() as $return) {
         if ($return === true) {
             return;
         }
         // skip checks if allowed by hook
     }
     $s = $request->getFiltered('_key');
     if (empty($s) || strlen($s) < 10) {
         throw new Am_Exception_InputError("API Error 10001 - no [key] specified or key is too short");
     }
     $apikey = $this->getDi()->apiKeyTable->findFirstByKey($s);
     if (!$apikey || $apikey->is_disabled) {
         throw new Am_Exception_InputError("API Error 10002 - [key] is not found or disabled");
     }
     $perms = $apikey->getPerms();
     if (empty($perms[$alias][$method]) || !$perms[$alias][$method]) {
         throw new Am_Exception_InputError("API Error 10003 - no permissions for {$alias}-{$method} API call");
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:30,代码来源:Bootstrap.php


示例3: directAction

 function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'ipn') {
         echo 'OK';
     }
     return parent::directAction($request, $response, $invokeArgs);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:paymentwall.php


示例4: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'ipn' && ($request->getParam('monelib_meaning') == 'USEMULTISHOT' || $request->getParam('monelib_meaning') == 'USEEZSHOT')) {
         return;
     }
     parent::directAction($request, $response, $invokeArgs);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:monelib.php


示例5: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getFiltered('INVNUM', $request->getFiltered('INVOICE')) == '') {
         $response->setRedirect($this->getRootUrl() . '/thanks');
     } else {
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:payflow-link.php


示例6: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'thanks') {
         return $this->thanksAction($request, $response, $invokeArgs);
     } else {
         return parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:8,代码来源:clickbank.php


示例7: createTransaction

 public function createTransaction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'api') {
         return new Am_Paysystem_Transaction_1shoppingcart_api($this, $request, $response, $invokeArgs);
     } else {
         return new Am_Paysystem_Transaction_1shoppingcart($this, $request, $response, $invokeArgs);
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:8,代码来源:1shoppingcart.php


示例8: createTransaction

 public function createTransaction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->get('ACK')) {
         return new Am_Paysystem_WsoPro_Transaction_PRO($this, $request, $response, $invokeArgs);
     } else {
         return new Am_Paysystem_WsoPro_Transaction($this, $request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:warrior-plus.php


示例9: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     $user = $this->getDi()->user;
     $id = $this->getDi()->app->reveal($request->getActionName());
     //actualy it is notification_id
     $notification = $this->getDi()->notificationTable->load($id);
     $this->getDi()->notificationClickTable->log($user, $notification);
     Am_Controller::redirectLocation($notification->url);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:9,代码来源:notification.php


示例10: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ('reject' == $request->getActionName()) {
         $invoice = $this->getDi()->invoiceTable->findFirstByPublicId($request->get("orderDescription"));
         $url = $this->getRootUrl() . "/cancel?id=" . $invoice->getSecureId('CANCEL');
         return Am_Controller::redirectLocation($url);
     } else {
         return parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:10,代码来源:ipaydna.php


示例11: _process

 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $user = $invoice->getUser();
     $a = new Am_Paysystem_Action_Redirect($this->host());
     $vars = array('TransactionType' => 'SALE', 'ServiceID' => $this->getConfig('ServiceID'), 'PaymentID' => $invoice->public_id, 'OrderNumber' => $invoice->public_id, 'PaymentDesc' => $invoice->getLineDescription(), 'MerchantReturnURL' => $this->getPluginUrl('thanks'), 'Amount' => $invoice->first_total, 'CurrencyCode' => $invoice->currency, 'CustIP' => $request->getClientIp(), 'CustName' => $user->getName(), 'CustEmail' => $user->email, 'CustPhone' => $user->phone, 'MerchantName' => $this->getDi()->config->get('site_title'), 'PageTimeout' => '3600');
     $a->HashValue = hash('sha256', $this->getConfig('password') . $vars['ServiceID'] . $vars['PaymentID'] . $vars['MerchantReturnURL'] . $vars['Amount'] . $vars['CurrencyCode'] . $vars['CustIP'] . $vars['PageTimeout']);
     foreach ($vars as $k => $v) {
         $a->{$k} = $v;
     }
     $result->setAction($a);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:11,代码来源:e-ghl.php


示例12: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == self::ACTION_IPN) {
         return parent::directAction($request, $response, $invokeArgs);
     } else {
         $request->setActionName($request->getActionName());
         $p = new Am_Controller_CreditCard($request, $response, $invokeArgs);
         $p->setPlugin($this);
         $p->run();
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:11,代码来源:CreditCard.php


示例13: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'refund') {
         echo "OK";
         ob_flush();
         return $this->refundAction($request, $response, $invokeArgs);
     } else {
         echo "<softshop></softshop>";
         ob_flush();
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:12,代码来源:swreg.php


示例14: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     $actionName = $request->getActionName();
     if ($actionName == 'fail') {
         $invoice = $this->getDi()->invoiceTable->findFirstByPublicId($request->getParam('m_orderid'));
         if (!$invoice) {
             throw new Am_Exception_InputError();
         }
         return Am_Controller::redirectLocation($this->getRootUrl() . "/cancel?id=" . $invoice->getSecureId('CANCEL'));
     } else {
         return parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:13,代码来源:payeer.php


示例15: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'ipn') {
         try {
             parent::directAction($request, $response, $invokeArgs);
         } catch (Exception $ex) {
             $this->getDi()->errorLogTable->logException($ex);
         }
         echo '45000';
     } else {
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:13,代码来源:targetpay-wap.php


示例16: __construct

 public function __construct(Am_Paysystem_Abstract $plugin, Am_Request $request, Zend_Controller_Response_Http $response, $invokeArgs)
 {
     $DR = preg_replace("/\\s/", "+", $request->get('DR', $_GET['DR']));
     $rc4 = new Crypt_RC4($plugin->getConfig('secret', 'ebskey'));
     $QueryString = base64_decode($DR);
     $rc4->decrypt($QueryString);
     $QueryString = split('&', $QueryString);
     foreach ($QueryString as $param) {
         $param = split('=', $param);
         $request->setParam($param[0], $param[1]);
     }
     parent::__construct($plugin, $request, $request, $invokeArgs);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:13,代码来源:ebs.php


示例17: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     $invoice = $this->getDi()->invoiceTable->findBySecureId($request->getFiltered('id'), $this->getId());
     if (!$invoice) {
         throw new Am_Exception_InputError(___("Sorry, seems you have used wrong link"));
     }
     $view = new Am_View();
     $html = $this->getConfig('html', 'SITE OWNER DID NOT PROVIDE INSTRUCTIONS FOR OFFLINE PAYMENT YET');
     $tpl = new Am_SimpleTemplate();
     $tpl->invoice = $invoice;
     $tpl->user = $this->getDi()->userTable->load($invoice->user_id);
     $tpl->invoice_id = $invoice->invoice_id;
     $tpl->cancel_url = REL_ROOT_URL . '/cancel?id=' . $invoice->getSecureId('CANCEL');
     $view->content = $tpl->render($html);
     $view->title = $this->getTitle();
     $response->setBody($view->render("layout.phtml"));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:17,代码来源:offline.php


示例18: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'cancelpaysafecart') {
         // SEE par.3
         @(list($id, $code) = explode('-', filterId($request->getFiltered('id')), 2));
         $invoice = Am_Di::getInstance()->InvoiceTable->findFirstByPublicId(filterId($id));
         if (!$invoice) {
             throw new Am_Exception_InputError("No invoice found [{$id}]");
         }
         $invoice->setCancelled(true);
         $a = new Am_Paysystem_Action_HtmlTemplate_Paysafecard($this->getDir(), 'payment-paysafecard-cancel.phtml');
         $a->process(new Am_Controller($request, $response, $invokeArgs));
         // see par.3
     } else {
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:17,代码来源:paysafecard.php


示例19: run

 public function run()
 {
     $record = $this->grid->getRecord();
     $record->generateCode();
     $vars = $record->toRow();
     unset($vars['saved_form_id']);
     unset($vars['default_for']);
     $vars['title'] = ___('Copy of') . ' ' . $record->title;
     $back = @$_SERVER['HTTP_X_REQUESTED_WITH'];
     $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
     $request = new Am_Request($vars + array($this->grid->getId() . '_a' => 'insert-' . $record->type, $this->grid->getId() . '_b' => $this->grid->getBackUrl()), Am_Request::METHOD_POST);
     $controller = new AdminSavedFormController($request, new Zend_Controller_Response_Http(), array('di' => Am_Di::getInstance()));
     $request->setModuleName('default')->setControllerName('admin-saved-form')->setActionName('index')->setDispatched(true);
     $controller->dispatch('indexAction');
     $response = $controller->getResponse();
     $response->sendResponse();
     $_SERVER['HTTP_X_REQUESTED_WITH'] = $back;
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:18,代码来源:AdminSavedFormController.php


示例20: createTransaction

 public function createTransaction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     switch ($request->get("transactionType")) {
         case Am_Paysystem_Transaction_Plimus::CHARGE:
         case Am_Paysystem_Transaction_Plimus::RECURRING:
         case Am_Paysystem_Transaction_Plimus::AUTH_ONLY:
             return new Am_Paysystem_Transaction_Plimus_Charge($this, $request, $response, $invokeArgs);
         case Am_Paysystem_Transaction_Plimus::CANCELLATION:
             return new Am_Paysystem_Transaction_Plimus_Cancellation($this, $request, $response, $invokeArgs);
         case Am_Paysystem_Transaction_Plimus::REFUND:
             return new Am_Paysystem_Transaction_Plimus_Refund($this, $request, $response, $invokeArgs);
         case Am_Paysystem_Transaction_Plimus::CANCELLATION_REFUND:
             return new Am_Paysystem_Transaction_Plimus_Cancellation_Refund($this, $request, $response, $invokeArgs);
         case Am_Paysystem_Transaction_Plimus::CONTRACT_CHANGE:
             return new Am_Paysystem_Transaction_Plimus_Contract_Change($this, $request, $response, $invokeArgs);
         default:
             return null;
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:19,代码来源:plimus.php



注:本文中的Am_Request类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AmazonS3类代码示例发布时间:2022-05-23
下一篇:
PHP Am_Query类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap