Show payment page
@return \Magento\Framework\View\Result\PageFactory
178110
public function execute()
    {

        //$cardInternational = $this->getRequest()->getParam('card_international');

        try {
            $creditCard = new CreditCardMethod(
                $this->_objectManager->create('Magento\Directory\Api\CountryInformationAcquirerInterface'),
                $this->_objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'),
                $this->_objectManager->create('Magento\Framework\Module\ModuleList'),
                $this->loadOrder(),
                $this->_objectManager->create('UOL\PagSeguro\Helper\Library'),
                $data = [
                    'sender_document' => $this->helperData()->formatDocument($this->getRequest()->getParam('sender_document')),
                    'sender_hash' => $this->getRequest()->getParam('sender_hash'),
                    'order_id' => $this->lastRealOrderId(),
                    'installment' => [
                        'quantity' => $this->getRequest()->getParam('installment_quantity'),
                        'amount'   => $this->getRequest()->getParam('installment_amount')
                    ],
                    'token' => $this->getRequest()->getParam('card_token'),
                    'holder' => [
                        'name'       => $this->getRequest()->getParam('holder_name'),
                        'birth_date' => $this->getRequest()->getParam('holder_birthdate'),

                    ]
                ]
            );
            return $this->placeOrder($creditCard);

        } catch (\Exception $exception) {
            $this->changeOrderHistory('pagseguro_cancelada');
            $this->clearSession();
            return $this->whenError($exception->getMessage());
        }
    }
68689
public function showNew()
    {
        $pages_list = $this->core->api('Page/all', 'GET')->run();
        return $this->templates->render("Main::Pages/New", [
            "messages" => [
                'error' => '',
                'info' => '',
                'success' => '',
                'warning' => ''
            ],
            "request" => [],
            "pages" => $pages_list['response']
        ]);
    }
593891
public function billing()
    {
        $form = $this->BillingForm();
        
        // If we are using simple checkout, skip
        if (Checkout::config()->simple_checkout) {
            return $this->redirect($this->Link('finish'));
        }
            
        // Check permissions for guest checkout
        if (!Member::currentUserID() && !Checkout::config()->guest_checkout) {
            return $this->redirect($this->Link('index'));
        }

        // Pre populate form with member info
        if (Member::currentUserID()) {
            $form->loadDataFrom(Member::currentUser());
        }

        $this->customise(array(
            'Title'     => _t('Checkout.BillingDetails', "Billing Details"),
            'Form'      => $form
        ));

        $this->extend("onBeforeBilling");

        return $this->renderWith(array(
            'Checkout_billing',
            'Checkout',
            'Page'
        ));
    }
300982
public function execute()
    {
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();
        $this->initPage($resultPage)->getConfig()->getTitle()->prepend(__('EaDesign PDF Generator Templates'));
        return $resultPage;
    }
1247666
public function showPages()
    {
        // Get dependencies
        $page = ($this->container->dataMapper)('PageMapper');

        // Fetch pages & templates
        $data['pages'] = $page->findPages(true);
        $data['templates'] = $this->getPageTemplates('page');

        return $this->render('pages.html', $data);
    }
947515
public function index()
    {
        $templates = $this->template->where('active', 1)->where('type', 'default')->get();
        
        $pages = $this->page->get();
        
        return view('chuckcms::backend.templates.index', compact('templates', 'pages'));
    }
504365
public function getCurrentPage()
	{
		$page = (int) $this->currentPage ?: $this->request->query->get($this->pageName, 1);

		if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false)
		{
			return 1;
		}

		return $page;
	}
259736
public function display(Request $request, Payment $payment, ConfigServiceInterface $configService)
    {
        return $this->render('@c975LPayment/pages/display.html.twig', array(
            'payment' => $payment,
            'siteName' => $configService->getParameter('c975LCommon.site'),
        ));
    }
584710
public function showAction()
    {
        $id = (int) $this->params()->fromRoute('id', null);

        $service = $this->getService();
        $entity  = $service->getById($id);

        $view = new ViewModel(array(
            'entity'  => $entity,
            'options' => $this->getOptions(),
        ));

        if ($this->getOptions()->getDisplayDiagrammInDetailView()) {
            $diagramm = $this->getService()->createUseCaseDiagrammFor($entity);
            $view->setVariable('diagramm', $diagramm);
        }

        return $view;
    }
323747
public function paymentAction()
    {
        $order = $this->checkRequest();

        return $this->render('SonataPaymentBundle:Payment:debug.html.twig', [
            'order' => $order,
            'check' => $this->getCurrentRequest()->get('check'),
        ]);
    }
543576
public function getPaymentLink()
    {
        if (($sValue = $this->getViewConfigParam('paymentlink')) === null) {
            $sValue = $this->getConfig()->getShopSecureHomeUrl() . 'cl=payment';
            $this->setViewConfigParam('paymentlink', $sValue);
        }

        return $sValue;
    }
891002
public function view()
    {
        $code = $this->code();

        // If there are images supposed to appear on the editor, lets find them
        $imageList = [];
        if (isset($this->entity->images['class']) && $imageClass = $this->entity->images['class']) {
            $images = $imageClass::orderBy(isset($this->entity->images['field']) ? $this->entity->images['field'] : 'created_at',
                                           isset($this->entity->images['order']) ? $this->entity->images['order'] : 'desc')
                      ->get();

            foreach ($images as $image) {
                $value = isset($this->entity->images['value']) ?
                                $image->$this->entity->images['value'] :
                                $image->image_name;

                $imageList[] = [
                    'title' => (isset($this->entity->images['title']) ? $image->$this->entity->images['title'] : $image->description) ?: $value,
                    'value' => asset(rtrim($this->entity->images['path'], '/').'/'.$value),
                ];
            }
        }

        return view('panel::form', [
                        'entity'    => $this->entity,
                        'header'    => $this->header(),
                        'record'    => $this->record,
                        'title'     => $this->entity->title,
                        'panel'     => $this->record ? trans('panel::global.edit_entity', ['entity' => $this->entity->name()]) : trans('panel::global.save_entity', ['entity' => $this->entity->name()]),
                        'footer'    => $this->footer(),
                        'formCode'  => $code,
                        'imageList' => $imageList,
                    ]);
    }
671434
public function index()
    {
        $orderGrid = new OrderGrid($this->repository->query()->orderBy('id', 'desc'));

        return view('avored-ecommerce::order.index')->with('dataGrid', $orderGrid->dataGrid);
    }
1342297
public function render()
    {
        $sTemplate = parent::render();
        $oPayment = $this->getPayment();
        $oConfig = $this->_getContainer()->getConfig();

        //payment is set and not oxempty if amazon selected?
        if ($oPayment !== false) {
            $sPaymentId = (string)$this->getPayment()->getId();
            $sAmazonOrderReferenceId = (string)$this->_getContainer()
                ->getSession()->getVariable('amazonOrderReferenceId');

            if ($sAmazonOrderReferenceId !== '') {
                if ($sPaymentId === 'oxempty') {
                    $this->_setErrorAndRedirect(
                        'BESTITAMAZONPAY_NO_PAYMENTS_FOR_SHIPPING_ADDRESS',
                        $oConfig->getShopSecureHomeUrl().'cl=user'
                    );

                    return $sTemplate;
                } elseif ($sPaymentId === 'bestitamazon'
                    && (string)$oConfig->getRequestParameter('fnc') !== 'execute'
                    && (string)$oConfig->getRequestParameter('action') !== 'changePayment'
                ) {
                    //Send Order reference details to Amazon if payment id is bestitamazon and amazonreferenceid exists
                    //Send SetOrderReferenceDetails request
                    $oData = $this->_getContainer()->getClient()->setOrderReferenceDetails($this->getBasket());
                    $oReferenceDetails = isset($oData->SetOrderReferenceDetailsResult->OrderReferenceDetails)
                        ? $oData->SetOrderReferenceDetailsResult->OrderReferenceDetails : null;

                    //If payment method is not valid to choose
                    if ($oReferenceDetails !== null
                        && (string)$oReferenceDetails->Constraints->Constraint->ConstraintID === 'PaymentMethodNotAllowed'
                    ) {
                        $this->_setErrorAndRedirect(
                            'BESTITAMAZONPAY_CHANGE_PAYMENT',
                            $oConfig->getShopSecureHomeUrl().'cl=payment'
                        );
                        return $sTemplate;
                    }

                    //If there's some other unexpected error
                    if ($oReferenceDetails === null
                        || (string)$oReferenceDetails->OrderReferenceStatus->State !== 'Draft'
                    ) {
                        $sAdditionalParameters = '';

                        // check if there is any information about an error
                        if ($oData->Error->Code) {
                            $sAdditionalParameters = '&bestitAmazonPay4OxidErrorCode='.$oData->Error->Code
                                .'&error='.$oData->Error->Message;
                        }

                        $this->_getContainer()->getUtils()->redirect(
                            $oConfig->getShopSecureHomeUrl().'cl=user&fnc=cleanAmazonPay'.$sAdditionalParameters,
                            false
                        );
                        return $sTemplate;
                    }
                }
            } elseif ($sPaymentId === 'bestitamazon') {
                // If selected payment was bestitamazon but there's no amazonreferenceid,
                // redirect back to second step and show message
                $this->_setErrorAndRedirect(
                    'BESTITAMAZONPAY_CHANGE_PAYMENT',
                    $oConfig->getShopSecureHomeUrl().'cl=basket'
                );
            }
        }

        $this->setBasketHash();

        return $sTemplate;
    }
576199
public function pager() {
        global $OUTPUT;

        return $OUTPUT->paging_bar(
            $this->totalitemcount, $this->page, $this->perpage,
            new moodle_url('/grade/report/singleview/index.php', array(
                'perpage' => $this->perpage,
                'id' => $this->courseid,
                'group' => $this->groupid,
                'itemid' => $this->itemid,
                'item' => 'grade'
            ))
        );
    }
1167125
public function renderPagebrowser()
    {
        /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
        $view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
        $view->setTemplateRootPaths($this->conf['view']['templateRootPaths']);
        $view->setTemplate('Widget/Pagination');
        $pagination = [];

        $numberOfResults = $this->numberOfResults;
        $resultsPerPage = $this->conf['resultsPerPage'];
        $maxPages = $this->conf['maxPagesInPagebrowser'];

        // get total number of items to show
        // show pagebrowser only if there are more entries that are shown on one page
        if ($numberOfResults > $resultsPerPage) {
            $this->limit = $resultsPerPage;
        } else {
            return;
        }

        // set db limit
        $start = ($this->piVars['page'] * $resultsPerPage) - $resultsPerPage;
        $this->dbLimit = $start . ',' . $resultsPerPage;
        $end = ($start + $resultsPerPage > $numberOfResults) ? $numberOfResults : ($start + $resultsPerPage);

        // number of pages
        $pagesTotal = ceil($numberOfResults / $resultsPerPage);

        // calculate start and end page
        $startPage = $this->piVars['page'] - ceil(($maxPages / 2));
        $endPage = $startPage + $maxPages - 1;
        if ($startPage < 1) {
            $startPage = 1;
            $endPage = $startPage + $maxPages - 1;
        }
        if ($startPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }
        if ($endPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }

        // create pages list, previous, current and next for pagination widget
        $pages = [];
        for ($i = 1; $i <= $pagesTotal; $i++) {
            if ($i >= $startPage && $i <= $endPage) {
                $pages[] = $i;
            }
        }
        $pagination['pages'] = $pages;

        if ($this->piVars['page'] > 1) {
            $pagination['previous'] = $this->piVars['page'] - 1;
        }

        if ($this->piVars['page'] < $pagesTotal) {
            $pagination['next'] = $this->piVars['page'] + 1;
        }

        $pagination['currentPage'] = $this->piVars['page'];
        $view->assign('pagination', $pagination);

        // render pagebrowser content and pass it together with some variables to fluid template
        $markerArray = array(
            'current' => $this->piVars['page'],
            'pages_total' => $pagesTotal,
            'pages_list' => $view->render(),
            'start' => $start + 1,
            'end' => $end,
            'total' => $numberOfResults,
            'results' => $this->pi_getLL('results'),
            'until' => $this->pi_getLL('until'),
            'of' => $this->pi_getLL('of'),
        );

        // hook for additional markers in pagebrowser
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'] as $_classRef) {
                $_procObj = &GeneralUtility::makeInstance($_classRef);
                $_procObj->pagebrowseAdditionalMarker(
                    $markerArray,
                    $this
                );
            }
        }

        $this->fluidTemplateVariables['pagebrowser'] = $markerArray;
    }
615096
public function getCurrentPage()
    {
        $page = (int) $this->request->getParam(self::PAGE_PARM_NAME);
        return $page ? $page : 1;
    }