private function screen() { $bankData = SPLang::getValue('bankdata', 'application', Sobi::Section()); if (!strlen($bankData)) { SPLang::getValue('bankdata', 'application'); } $tile = Sobi::Txt('APP.BANK_TRANSFER_NAME'); $this->getView('bank_transfer')->assign($tile, 'title')->assign($bankData, 'bankdata')->determineTemplate('extensions', 'bank-transfer')->display(); }
private function screen() { $data = SPFactory::registry()->loadDBSection('paypal_' . Sobi::Section())->get('paypal_' . Sobi::Section()); if (!count($data)) { $data = SPFactory::registry()->loadDBSection('paypal')->get('paypal'); } $ppexpl = SPLang::getValue('ppexpl', 'application', Sobi::Section()); $ppsubj = SPLang::getValue('ppsubject', 'application', Sobi::Section()); if (!strlen($ppsubj)) { $ppsubj = SPLang::getValue('ppsubject', 'application'); } $this->getView('paypal')->assign($tile, 'title')->assign($data['ppurl']['value'], 'ppurl')->assign($data['ppemail']['value'], 'ppemail')->assign($data['pprurl']['value'], 'pprurl')->assign($data['ppcc']['value'], 'ppcc')->assign($ppexpl, 'ppexpl')->assign($ppsubj, 'ppsubject')->determineTemplate('extensions', 'paypal')->display(); }
/** * @return array * Ausgabe des Feldes in DV and vCard */ public function struct() { $data = SPLang::getValue($this->nid . '-viewInfo', 'field_information', Sobi::Section()); $attributes = array(); if (strlen($data)) { $this->cssClass = strlen($this->cssClass) ? $this->cssClass : 'spFieldsData'; $this->cssClass = $this->cssClass . ' ' . $this->nid; $this->cleanCss(); $attributes = array('lang' => Sobi::Lang(), 'class' => $this->cssClass); } else { $this->cssClass = strlen($this->cssClass) ? $this->cssClass : 'spField'; } return array('_complex' => 1, '_data' => $data, '_attributes' => $attributes); }
/** * This function have to add own string into the given array * Basically: $methods[ $this->id ] = "Some String To Output"; * Optionally the value can be also SobiPro Arr2XML array. * Check the documentation for more information * @param array $methods * @param SPEntry $entry * @param array $payment * @param bool $message * @return void */ public function PaymentMethodView(&$methods, $entry, &$payment, $message = false) { $data = SPFactory::registry()->loadDBSection('paypal_' . Sobi::Section())->get('paypal_' . Sobi::Section()); if (!count($data)) { $data = SPFactory::registry()->loadDBSection('paypal')->get('paypal'); } $cfg = SPLoader::loadIniFile('etc.paypal'); $rp = $cfg['general']['replace']; $to = $cfg['general']['replace'] == ',' ? '.' : ','; $amount = str_replace($rp, $to, $payment['summary']['sum_brutto']); $values = array('entry' => $entry, 'amount' => preg_replace('/[^0-9\\.,]/', null, $amount), 'ppurl' => SPLang::replacePlaceHolders($data['ppurl']['value'], $entry), 'ppemail' => SPLang::replacePlaceHolders($data['ppemail']['value'], $entry), 'pprurl' => SPLang::replacePlaceHolders($data['pprurl']['value'], $entry), 'ppcc' => SPLang::replacePlaceHolders($data['ppcc']['value'], $entry)); $expl = SPLang::replacePlaceHolders(SPLang::getValue('ppexpl', 'plugin', Sobi::Section()), $values); $subject = SPLang::replacePlaceHolders(SPLang::getValue('ppsubject', 'plugin', Sobi::Section()), $values); $values['expl'] = $expl; $values['subject'] = $subject; $values['ip'] = SPRequest::ip('REMOTE_ADDR', 0, 'SERVER'); $methods[$this->id] = array('content' => $message ? $this->raw($cfg, $values) : $this->content($cfg, $values), 'title' => Sobi::Txt('APP.PPP.PAY_TITLE')); }
protected function getRejectionsTemplates() { $templates = SPFactory::registry()->loadDBSection('rejections-templates_' . Sobi::Section())->get('rejections-templates_' . Sobi::Section()); if (!$templates) { $templates = SPFactory::registry()->loadDBSection('rejections-templates')->get('rejections-templates'); } $f = array(); foreach ($templates as $tid => $template) { $desc = SPLang::getValue($tid, 'rejections-templates', Sobi::Section()); if (!$desc) { $desc = SPLang::getValue($tid, 'rejections-templates', 0); } $f[$tid] = array('params' => SPConfig::unserialize($template['params']), 'key' => $tid, 'value' => $template['value'], 'description' => $desc, 'options' => $template['options']); } ksort($f); return $f; }
/** * This function have to add own string into the given array * Basically: $methods[ $this->id ] = "Some String To Output"; * Optionally the value can be also SobiPro Arr2XML array. * Check the documentation for more information * @param array $methods * @param SPEntry $entry * @param array $payment * @return void */ public function PaymentMethodView(&$methods, $entry, &$payment) { $bankdata = SPLang::getValue('bankdata', 'plugin', Sobi::Section()); $bankdata = SPLang::replacePlaceHolders($bankdata, array('entry' => $entry)); $methods[$this->id] = array('content' => SPLang::clean($bankdata), 'title' => Sobi::Txt('APP.PBT.PAY_TITLE')); }