Will generate the pay button
@return string
482468
private function generateButton() {
        return Html::tag('button', $this->encodeLabel ? Html::encode($this->label) : $this->label, $this->buttonOptions);
    }
274283
public function generate()
    {
        $GLOBALS['TL_JAVASCRIPT']['cca.dc-general.vanillaGeneral'] = 'bundles/ccadcgeneral/js/vanillaGeneral.js';

        $environment = $this->getEnvironment();
        $translator  = $environment->getTranslator();
        $template    = new ContaoBackendViewTemplate('widget_treepicker');

        $icon = new GenerateHtmlEvent($this->titleIcon);
        $environment->getEventDispatcher()->dispatch(ContaoEvents::IMAGE_GET_HTML, $icon);

        $template
            ->setTranslator($translator)
            ->set('id', $this->strId)
            ->set('name', $this->strName)
            ->set('class', ($this->strClass ? ' ' . $this->strClass : ''))
            ->set('icon', $icon->getHtml())
            ->set('title', $translator->translate($this->title ?: 'MSC.treePicker', '', [$this->sourceName]))
            ->set('changeSelection', $translator->translate('MSC.changeSelection'))
            ->set('dragItemsHint', $translator->translate('MSC.dragItemsHint'))
            ->set('fieldType', $this->fieldType)
            ->set('values', $this->renderItemsPlain())
            ->set('label', $this->label)
            ->set('popupUrl', $this->generatePickerUrl())
            ->set('updateUrl', $this->generateUpdateUrl())
            ->set('providerName', $this->sourceName);

        $this->addOrderFieldToTemplate($template);

        // Load the fonts for the drag hint.
        $GLOBALS['TL_CONFIG']['loadGoogleFonts'] = true;

        return $template->parse();
    }
1345867
public function generateRequest()
    {
        if (!$this->confirm('Do you want to create form request classes?')) {
            return;
        }

        foreach (['Create', 'Update'] as $request) {
            $name = $this->getPrefix('/').$this->getEntities().'/'.$request.Str::studly($this->getEntity()).'Request';

            $this->console->call('generate:request', [
                'name' => $name,
                '--scaffold' => true,
                '--auth' => true,
                '--rules' => $this->existing() ? $this->getTableDumper()->toSchema() : $this->getFields(),
                '--force' => $this->console->option('force'),
            ]);
        }
    }
1364035
public function getButton()
    {
        if ($class = $this->config()->button_class) {
            
            // Create Button:
            
            $button = $class::create();
            
            // Extend Button:
            
            $this->extend('updateButton', $button);
            
            // Answer Button:
            
            return $button;
            
        }
    }
490476
public function input() {

		$output       = '<input type="hidden" value="' . esc_attr( $this->get_value() ) . '" ' . $this->build_attributes() . '>';
		$button_text  = isset( $this->struct['add_label'] ) ? $this->struct['add_label'] : __( 'Select Image', 'uix' );
		$preview_size = isset( $this->struct['preview_size'] ) ? $this->struct['preview_size'] : 'medium';
		$type         = isset( $this->struct['type'] ) ? $this->struct['type'] : 'id';
		$size         = isset( $this->struct['size'] ) ? $this->struct['size'] : 'full';
		$output      .= $this->preview( $preview_size );
		$output      .= '<button type="button" data-size="' . esc_attr( $size ) . '" data-type="' . esc_attr( $type ) . '" data-preview-size="' . esc_attr( $preview_size ) . '" data-target="' . esc_attr( $this->id() ) . '" class="button button-small uix-image-control-button">' . esc_html( $button_text ) . '</button>';

		return $output;
	}
1052723
public function generate()
  {
    if (TL_MODE == 'BE')
    {
      $objTemplate = new \BackendTemplate('be_wildcard');

      $objTemplate->wildcard = '### ModuleTrackEdit ###';
      $objTemplate->title = $this->headline;
      $objTemplate->id = $this->id;
      $objTemplate->link = $this->name;
      $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;

      return $objTemplate->parse();
    }


    if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item']))
		{
			\Input::setGet('items', \Input::get('auto_item'));
		}

		if (!\Input::get('items'))
		{
			global $objPage;
			$objPage->noSearch = 1;
			$objPage->cache = 0;
			return '';
		}


		$strItem = \Input::get('items');

		if (strpos($strItem, "track")!==false)
		{
  		$this->strType = "track";
  		$this->intTrackId = str_replace("track_", "", $strItem);
		}
		if (strpos($strItem, "poi")!==false)
		{
  		$this->strType = "poi";
  		$this->intPoiId = str_replace("poi_", "", $strItem);
		}
		if (!$this->strType || $this->strType=="")
		{
			global $objPage;
			$objPage->noSearch = 1;
			$objPage->cache = 0;
			return '';
		}

    return parent::generate();
  }
1363578
public function executeAction()
    {
        /**
         * The execute action will generate the Paypal web
         * checkout form before redirecting.
         */
        $formView = $this
            ->paypalWebCheckoutManager
            ->generatePaypalForm();

        $data = $this
            ->engine
            ->render('PaypalWebCheckoutBundle:Payment:process.html.twig', [
                'form' => $formView,
            ]);

        return new Response($data);
    }
1285125
public function run()
    {
        $this->registerClientScript();
        if ($this->hasModel()) {
            $input = Html::activeTextInput($this->model, $this->attribute, $this->options);
            $fileInput = Html::fileInput(Html::getInputName($this->model, $this->attribute), null, $this->fileInputOptions);
        } else {
            $input = Html::textInput($this->name, $this->value, $this->options);
            $fileInput = Html::fileInput($this->name, $this->value, $this->fileInputOptions);
        }

        $button = Html::tag('div', $fileInput . '<span>' . $this->buttonText . '</span>', $this->buttonOptions);
        return strtr($this->template, [
            '{id}' => $this->getId(),
            '{input}' => $input,
            '{button}' => $button,
            '{fields}' => $this->fields
        ]);
    }
1223646
public function render(): string
	{
		$targetUrl = Escaper::htmlEntityEncode(self::buildUrl());

		if ($this->buttonStyle === null) {
			return "<a href=\"{$targetUrl}\">{$this->buttonText}</a>";
		}

		$gateUrl = $this->payment->getMerchantConfig()->gateUrl;

		$buttonStyle = rawurlencode($this->buttonStyle);
		$src = Escaper::htmlEntityEncode($gateUrl . 'buttons/' . $buttonStyle . '.png');
		$title = Escaper::htmlEntityEncode($this->buttonText);

		return "<a href=\"{$targetUrl}\"><img src=\"{$src}\" alt=\"{$title}\" title=\"{$title}\" /></a>";
	}
1040966
public function generate()
    {
        $values = [];

        // Can be an array
        if (!empty($this->varValue) && null !== ($categories = NewsCategoryModel::findMultipleByIds((array) $this->varValue))) {
            /** @var NewsCategoryModel $category */
            foreach ($categories as $category) {
                $values[$category->id] = Image::getHtml('iconPLAIN.svg').' '.$category->title;
            }
        }

        $return = '<input type="hidden" name="'.$this->strName.'" id="ctrl_'.$this->strId.'" value="'.implode(',', array_keys($values)).'">'.($this->sorting ? '
  <input type="hidden" name="'.$this->strOrderName.'" id="ctrl_'.$this->strOrderId.'" value="'.$this->{$this->orderField}.'">' : '').'
  <div class="selector_container">'.(($this->sorting && count($values) > 1) ? '
    <p class="sort_hint">'.$GLOBALS['TL_LANG']['MSC']['dragItemsHint'].'</p>' : '').'
    <ul id="sort_'.$this->strId.'" class="'.($this->sorting ? 'sortable' : '').'">';

        foreach ($values as $k => $v) {
            $return .= '<li data-id="'.$k.'">'.$v.'</li>';
        }

        $return .= '</ul>';
        $pickerBuilder = System::getContainer()->get('contao.picker.builder');

        if (!$pickerBuilder->supportsContext('newsCategories')) {
            $return .= '
	<p><button class="tl_submit" disabled>'.$GLOBALS['TL_LANG']['MSC']['changeSelection'].'</button></p>';
        } else {
            $extras = ['fieldType' => $this->fieldType];

            if (is_array($this->rootNodes)) {
                $extras['rootNodes'] = array_values($this->rootNodes);
            }

            $return .= '
	<p><a href="'.ampersand($pickerBuilder->getUrl('newsCategories', $extras)).'" class="tl_submit" id="pt_'.$this->strName.'">'.$GLOBALS['TL_LANG']['MSC']['changeSelection'].'</a></p>
	<script>
	  $("pt_'.$this->strName.'").addEvent("click", function(e) {
		e.preventDefault();
		Backend.openModalSelector({
		  "id": "tl_listing",
		  "title": "'.StringUtil::specialchars(str_replace("'", "\\'", $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['label'][0])).'",
		  "url": this.href + document.getElementById("ctrl_'.$this->strId.'").value,
		  "callback": function(table, value) {
			new Request.Contao({
			  evalScripts: false,
			  onSuccess: function(txt, json) {
				$("ctrl_'.$this->strId.'").getParent("div").set("html", json.content);
				json.javascript && Browser.exec(json.javascript);
			  }
			}).post({"action":"reloadNewsCategoriesWidget", "name":"'.$this->strId.'", "value":value.join("\t"), "REQUEST_TOKEN":"'.REQUEST_TOKEN.'"});
		  }
		});
	  });
	</script>'.($this->sorting ? '
	<script>Backend.makeMultiSrcSortable("sort_'.$this->strId.'", "ctrl_'.$this->strId.'", "ctrl_'.$this->strId.'")</script>' : '');
        }

        $return = '<div>'.$return.'</div></div>';

        return $return;
    }
2017
public function capture()
    {
        $storage = new Storage();
        $config = new Config($storage->getAccount());

        if ($config->getDriver() == 'database') {
            return PayuPayment::find($storage->getPayment());
        }

        return new PayuPayment($storage->getPayment());
    }
105205
public function pay()
    {
        if (!Settings::first()->ready()) {
            return false;
        }

        if ($this->ammount != 0) {
            try {
                Charge::create([
                    'amount'      => $this->ammount,
                    'currency'    => $this->currency,
                    'source'      => $this->source,
                    'description' => $this->description,
                ]);
            } catch (Exception $e) {
                $this->error = $e;

                return false;
            }
        }

        return true;
    }
281432
protected function getInput()
	{
		// Initialize some field attributes.
		$rows = (int) $this->element['rows'];
		$cols = (int) $this->element['cols'];
		$height = ((string) $this->element['height']) ? (string) $this->element['height'] : '250';
		$width = ((string) $this->element['width']) ? (string) $this->element['width'] : '100%';
		$assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id';
		$authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by';
		$asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id'];

		// Build the buttons array.
		$buttons = (string) $this->element['buttons'];

		if ($buttons == 'true' || $buttons == 'yes' || $buttons == '1')
		{
			$buttons = true;
		}
		elseif ($buttons == 'false' || $buttons == 'no' || $buttons == '0')
		{
			$buttons = false;
		}
		else
		{
			$buttons = explode(',', $buttons);
		}

		$hide = ((string) $this->element['hide']) ? explode(',', (string) $this->element['hide']) : array();

		// Get an editor object.
		$editor = $this->getEditor();

		return $editor->display(
			$this->name, htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'), $width, $height, $cols, $rows,
			$buttons ? (is_array($buttons) ? array_merge($buttons, $hide) : $hide) : false, $this->id, $asset,
			$this->form->getValue($authorField)
		);
	}
1329489
public function getPayer()
    {
        $payer = $this->data['address_name'] . '/' . $this->data['payer_email'];
        $charset = strtoupper(str_replace("_", "-", $this->data['charset']));
        if ($charset !== 'UTF-8') {
            $payer = iconv($charset, 'UTF-8//IGNORE', $payer);
        }

        return $payer;
    }
1372015
protected function buildPayHtml()
    {
        $html = "<form id='alipaysubmit' name='alipaysubmit' action='{$this->gateway}' method='post'>";
        foreach ($this->options->get() as $key => $value) {
            $value = str_replace("'", '&apos;', $value);
            $html .= "<input type='hidden' name='{$key}' value='{$value}'/>";
        }
        $html .= "<input type='submit' value='ok' style='display:none;'></form>";
        return "{$html}<script>document.forms['alipaysubmit'].submit();</script>";
    }
286513
public function getPayController()
    {
        if ($this->_payController === null) {
            $this->_payController = $this->createControllerById('pay');
        }

        return $this->_payController;
    }
78118
public function getSubmitButton()
    {
        $element = $this->getElement($this->_submitFieldName);

        if (! $element) {
            // Submit knop
            $options = array('class' => 'button');

            $element = $this->createElement('submit', $this->_submitFieldName, $options);
            $element->setLabel($this->getSubmitButtonLabel());

            $this->addElement($element);
        }

        return $element;
    }