Ejemplo n.º 1
0
 function execute()
 {
     global $PHP_SELF, $lng, $request_type, $oscTemplate, $language, $request_type, $HTTP_GET_VARS, $current_lang_key;
     if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
         if (!isset($lng) || isset($lng) && !is_object($lng)) {
             include DIR_WS_CLASSES . 'language.php';
             $lng = new language();
         }
         if (count($lng->catalog_languages) > 1) {
             reset($lng->catalog_languages);
             $languages_array = array();
             while (list($key, $value) = each($lng->catalog_languages)) {
                 $languages_array[] = array('id' => $key, 'text' => $value['name']);
             }
             foreach ($lng->catalog_languages as $key => $value) {
                 if ($value['directory'] == $language) {
                     $current_lang_key = $key;
                     break;
                 }
             }
             reset($HTTP_GET_VARS);
             while (list($key, $value) = each($HTTP_GET_VARS)) {
                 if (is_string($value) && $key != 'language' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
                     $hidden_get_variables .= tep_draw_hidden_field($key, $value);
                 }
             }
             $data = '<div class="headerBox languages">' . '  <span class="headerTitle languages-title">' . MODULE_BOXES_HEADER_LANGUAGES_BOX_TITLE . '</span>' . '  <div class="headerBoxContents">' . '    ' . tep_draw_form('languages', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . '    ' . tep_draw_pull_down_menu('language', $languages_array, $current_lang_key, 'onchange="this.form.submit();"') . $hidden_get_variables . tep_hide_session_id() . '</form>' . '  </div>' . '</div>';
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
 function process_button()
 {
     global $order;
     $last_order_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " order by orders_id desc limit 1");
     $result = tep_db_fetch_array($last_order_id);
     $this->orderID = $result['orders_id'] + 1;
     $acceptURL = tep_href_link(FILENAME_CHECKOUT_PROCESS, 'referer=mokejimai', 'SSL');
     $cancelURL = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL');
     $callbackURL = tep_href_link('mokejimai_validation.php', '', 'SSL', false, false, true);
     $acceptURL = str_replace('&amp;', '&', $acceptURL);
     $cancelURL = str_replace('&amp;', '&', $cancelURL);
     $callbackURL = str_replace('&amp;', '&', $callbackURL);
     try {
         $request = WebToPay::buildRequest(array('projectid' => $this->projectID, 'sign_password' => $this->projectPass, 'orderid' => $this->orderID, 'amount' => intval(number_format($order->info['total'], 2, '', '')), 'currency' => $order->info['currency'], 'lang' => substr($_SESSION['language'], 0, 2) !== 'lt' ? 'ENG' : 'LTU', 'accepturl' => $acceptURL, 'cancelurl' => $cancelURL, 'callbackurl' => $callbackURL, 'country' => 'LT', 'logo' => '', 'p_firstname' => $order->customer['firstname'], 'p_lastname' => $order->customer['lastname'], 'p_email' => $order->customer['email_address'], 'p_street' => $order->customer['street_address'], 'p_city' => $order->customer['city'], 'p_state' => $order->customer['state'], 'p_zip' => $order->customer['postcode'], 'p_countrycode' => $order->customer['country']['iso_code_2'], 'test' => $this->testMode));
     } catch (WebToPayException $e) {
         echo get_class($e) . ': ' . $e->getMessage();
     }
     $html = '';
     if ($request) {
         foreach ($request as $key => $value) {
             $html .= tep_draw_hidden_field($key, $value);
         }
     }
     return $html;
 }
 function execute()
 {
     global $PHP_SELF, $currencies, $request_type, $currency, $oscTemplate;
     if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
         if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) {
             reset($currencies->currencies);
             $currencies_array = array();
             while (list($key, $value) = each($currencies->currencies)) {
                 $currencies_array[] = array('id' => $key, 'text' => $value['title']);
             }
             $hidden_get_variables = '';
             reset($_GET);
             while (list($key, $value) = each($_GET)) {
                 if (is_string($value) && $key != 'currency' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
                     $hidden_get_variables .= tep_draw_hidden_field($key, $value);
                 }
             }
             $form_output = tep_draw_form('currencies', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onchange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id() . '</form>';
             ob_start();
             include 'includes/modules/boxes/templates/currencies.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
Ejemplo n.º 4
0
 function process_button()
 {
     if (SHOP_ID == 14 || SHOP_ID == 16) {
         global $HTTP_POST_VARS;
         $process_button_string = tep_draw_hidden_field('purchase_order', tep_sanitize_string($HTTP_POST_VARS['purchase_order']));
         return $process_button_string;
     }
     return false;
 }
Ejemplo n.º 5
0
 function process_button()
 {
     $ic_country = $this->getUserCountry(MODULE_PAYMENT_ICEPAY_DDEBIT_COUNTRY);
     $ic_currency = $this->getUserCurrency(MODULE_PAYMENT_ICEPAY_DDEBIT_CURRENCY);
     $ic_language = $this->getUserLanguage(MODULE_PAYMENT_ICEPAY_DDEBIT_LANGUAGE);
     $ic_amount = $this->getOrderAmount(MODULE_PAYMENT_ICEPAY_DDEBIT_CURRENCY);
     $hidden_fields = parent::process_button(array('ic_country' => $ic_country, 'ic_currency' => $ic_currency, 'ic_language' => $ic_language, 'ic_amount' => $ic_amount));
     return tep_draw_hidden_field('ic_paymentmethod', 'DDEBIT') . tep_draw_hidden_field('ic_issuer', 'INCASSO') . $hidden_fields;
 }
 function execute()
 {
     global $request_type, $oscTemplate;
     $form_output = '    ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . '    <div class="input-group">' . '    ' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"', 'search') . '      <span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button></span>' . '    </div>' . tep_draw_hidden_field('search_in_description', '0') . tep_hide_session_id() . '    </form>';
     ob_start();
     include DIR_WS_MODULES . 'boxes/templates/search.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
Ejemplo n.º 7
0
 function execute()
 {
     global $request_type, $oscTemplate;
     if ($this->group == 'boxes_header') {
         $data = '<div class="col-sm-6">' . tep_navbar_search('btn-info', false) . '</div>';
     } else {
         $data = '<div class="panel panel-default">' . '  <div class="panel-heading">' . MODULE_BOXES_SEARCH_BOX_TITLE . '</div>' . '  <div class="panel-body text-center">' . '    ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . '    <div class="input-group">' . '    ' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"') . '      <span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="glyphicon glyphicon-search"></i></button></span>' . '    </div>' . tep_draw_hidden_field('search_in_description', '0') . tep_hide_session_id() . '<br />' . MODULE_BOXES_SEARCH_BOX_TEXT . '<br /><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><strong>' . MODULE_BOXES_SEARCH_BOX_ADVANCED_SEARCH . '</strong></a>' . '    </form>' . '  </div>' . '</div>';
     }
     $oscTemplate->addBlock($data, $this->group);
 }
Ejemplo n.º 8
0
 public function process_button($transactionID = 0, $key = "")
 {
     global $order, $currencies, $currency;
     $my_currency = strtoupper($GLOBALS['A2B']->config['global']['base_currency']);
     if (!in_array($my_currency, $this->paypal_allowed_currencies)) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('LC', 'US') . tep_draw_hidden_field('country', 'USA') . tep_draw_hidden_field('no_shipping', '1') . tep_draw_hidden_field('PHPSESSID', session_id()) . tep_draw_hidden_field('amount', number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('notify_url', tep_href_link("checkout_process.php?transactionID=" . $transactionID . "&sess_id=" . session_id() . "&key=" . $key, '', 'SSL')) . tep_draw_hidden_field('return', tep_href_link("userinfo.php", '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link("userinfo.php", '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 9
0
 function process_button()
 {
     global $order, $currencies, $currency;
     $my_currency = MODULE_PAYMENT_PAYPAL_CURRENCY;
     if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('no_shipping', '1') . tep_draw_hidden_field('PHPSESSID', session_id()) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link("checkout_process.php?sess_id=" . session_id(), '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 10
0
 function confirmation()
 {
     global $customer_id;
     include DIR_WS_FUNCTIONS . 'encryption.php';
     $stored_exists = tep_db_query("SELECT customers_personal FROM customers_personal WHERE customers_id = '" . (int) $customer_id . "' LIMIT 1");
     $stored_num = tep_db_fetch_array($stored_exists);
     $stored_num = tep_cc_decrypt($stored_num['customers_personal']);
     $cc_array = explode('|', $stored_num);
     $cust_name = tep_parse_name($cc_array[2]);
     $confirmation = array('title' => 'Credit Card', 'fields' => array(array('title' => 'Using the credit card on file:', 'field' => substr($cc_array[1], 0, 4) . str_repeat('X', 8) . substr($cc_array[1], -4)), array('title' => '', 'field' => tep_draw_hidden_field('payment', MODULE_PAYMENT_STORED_CC_TRUE_MODULE) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_TYPE, $cc_array[0]) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_NUMBER, $cc_array[1]) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_FIRSTNAME, $cust_name[1]) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_LASTNAME, $cust_name[0]) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_EXPIRATION, $cc_array[3]) . tep_draw_hidden_field(MODULE_PAYMENT_STORED_CC_FIELD_CHECKCODE, $cc_array[4]))));
     return $confirmation;
 }
Ejemplo n.º 11
0
 function process_button()
 {
     global $order, $currencies, $currency;
     $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     $my_currency = MODULE_PAYMENT_MONEYBOOKERS_CURRENCY;
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $process_button_string = tep_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . tep_draw_hidden_field('language', $my_language) . tep_draw_hidden_field('amount', number_format($order->info['total'] * $currencyObject->get_value($my_currency), $currencyObject->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency', $my_currency) . tep_draw_hidden_field('detail1_description', STORE_NAME) . tep_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . tep_draw_hidden_field('firstname', $order->billing['firstname']) . tep_draw_hidden_field('lastname', $order->billing['lastname']) . tep_draw_hidden_field('address', $order->billing['street_address']) . tep_draw_hidden_field('postal_code', $order->billing['postcode']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('country', $order->billing['country']['moneybookers']) . tep_draw_hidden_field('pay_from_email', $order->customer['email_address']) . tep_draw_hidden_field('status_url', tep_href_link("checkout_process.php?sess_id=" . session_id(), '', 'SSL')) . tep_draw_hidden_field('cancel_url', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 12
0
 function _process_button()
 {
     $icepay_country = $this->getUserCountry(MODULE_PAYMENT_ICEPAY_EBANKING_COUNTRY);
     $icepay_currency = $this->getUserCurrency(MODULE_PAYMENT_ICEPAY_EBANKING_CURRENCY);
     $icepay_language = $this->getUserLanguage(MODULE_PAYMENT_ICEPAY_EBANKING_LANGUAGE);
     $amount = $this->getOrderAmount(MODULE_PAYMENT_ICEPAY_EBANKING_CURRENCY);
     $process_button_string = tep_draw_hidden_field('ic_merchantid', MODULE_PAYMENT_ICEPAY_MERCHANT_ID) . tep_draw_hidden_field('ic_paymentmethod', 'DIRECTEBANK') . tep_draw_hidden_field('ic_orderid', $this->order_id) . tep_draw_hidden_field('ic_amount', $amount) . tep_draw_hidden_field('ic_currency', $icepay_currency) . tep_draw_hidden_field('ic_language', $icepay_language) . $this->create_eBanking_box();
     if (!MODULE_PAYMENT_ICEPAY_EBANKING_COUNTRY == "USER") {
         $process_button_string .= tep_draw_hidden_field('ic_country', $icepay_country);
     }
     $process_button_string .= tep_draw_hidden_field('ic_description', STORE_NAME) . tep_draw_hidden_field('type', "directebank");
     return $process_button_string;
 }
 function ajax_start()
 {
     extract(tep_load('defs', 'sessions'));
     $result = false;
     if ($cDefs->action != 'direct_management_select') {
         return $result;
     }
     $cStrings =& $this->strings;
     $contents = '<div class="bounder"><div class="formArea"><div class="blockpad">' . $cStrings->TEXT_INFO_DIRECT_MANAGEMENT_POPUP . '</div>' . tep_draw_form('dm_confirm', $cDefs->script, 'action=direct_management', 'POST', 'target="_blank"') . tep_draw_hidden_field('dm_select', 'confirm') . '<div class="formButtons">' . tep_image_submit('button_confirm.gif', IMAGE_CONFIRM) . '</div></form></div></div>';
     echo $contents;
     $cSessions->close();
     $result = true;
     return $result;
 }
Ejemplo n.º 14
0
 function process_button()
 {
     global $order, $currencies, $currency;
     if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
         $my_currency = $currency;
     } else {
         $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);
     }
     if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
         $my_currency = 'USD';
     }
     $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
     return $process_button_string;
 }
function confirmation() {
      global $order;
      $confirmation = array('title' => $this->title,
                            'fields' => array(array('title' => 'Clique o botão "Pagar com Itau Shopline" ao lado e após ser exibido o boleto, confirme o Pedido clicando no botão abaixo.',
                                                    'field' => tep_draw_form('form', MODULE_PAYMENT_ITAU_SHOPLINE_URL, 'post', 'name="form" onsubmit=carregabrw() target="SHOPLINE"') .
                                                               tep_draw_hidden_field('valor', $order->info['total'], '') .
                                                               tep_draw_hidden_field('cliente', $order->customer['firstname'] . ' ' . $order->customer['lastname'], '') .
                                                               tep_draw_hidden_field('endereco', $order->customer['street_address'], '') .
                                                               tep_draw_hidden_field('bairro', $order->customer['suburb'], '') .
                                                               tep_draw_hidden_field('cidade', $order->customer['city'], '') .
                                                               tep_draw_hidden_field('estado', $order->customer['state'], '') .
                                                               tep_draw_hidden_field('cep', $order->customer['postcode'], '') .
                                                               tep_draw_input_field('Itau', 'Ita&uacute; Shopline', '', 'submit', true) .
                                                               '</form>')));
      return $confirmation;
    }
Ejemplo n.º 16
0
 function process_button($transactionID = 0, $key = "")
 {
     global $order, $currencies, $currency;
     $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     $my_currency = strtoupper($GLOBALS['A2B']->config['global']['base_currency']);
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'USD';
     }
     $currencyObject = new currencies();
     $amount_toprocess = number_format($order->info['total'], $currencyObject->get_decimal_places($my_currency));
     $amount_toprocess = str_replace(',', '.', $amount_toprocess);
     $process_button_string = tep_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . tep_draw_hidden_field('language', $my_language) . tep_draw_hidden_field('amount', $amount_toprocess) . tep_draw_hidden_field('currency', $my_currency) . tep_draw_hidden_field('detail1_description', STORE_NAME) . tep_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . tep_draw_hidden_field('firstname', $order->billing['firstname']) . tep_draw_hidden_field('lastname', $order->billing['lastname']) . tep_draw_hidden_field('address', $order->billing['street_address']) . tep_draw_hidden_field('postal_code', $order->billing['postcode']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('country', $order->billing['country']['moneybookers']) . tep_draw_hidden_field('pay_from_email', $order->customer['email_address']);
     if ($transactionID != 0) {
         $process_button_string .= tep_draw_hidden_field('transaction_id', $transactionID);
     }
     $process_button_string .= tep_draw_hidden_field('status_url', tep_href_link("checkout_process.php?sess_id=" . session_id() . "&transactionID=" . $transactionID . "&key=" . $key, '', 'SSL')) . tep_draw_hidden_field('return_url', tep_href_link("userinfo.php", '', 'SSL')) . tep_draw_hidden_field('cancel_url', tep_href_link("checkout_payment.php", '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 17
0
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     global $PHP_SELF;
     if (tep_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = tep_draw_form('pages', basename($PHP_SELF), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, tep_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= tep_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= tep_draw_hidden_field(tep_session_name(), tep_session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
Ejemplo n.º 18
0
 function process()
 {
     global $order, $cart, $buysafe_result, $currencies, $WantsBond, $PHP_SELF;
     if (is_array($buysafe_result) && $buysafe_result['IsBuySafeEnabled'] == 'true') {
         $WantsBond = $buysafe_result['BondCostDisplayText'] != '' ? true : false;
         if (strstr($PHP_SELF, FILENAME_CHECKOUT_CONFIRMATION)) {
             $hidden_fields = '';
             if (is_array($_POST) && sizeof($_POST) > 0) {
                 reset($_POST);
                 while (list($key, $value) = each($_POST)) {
                     if (strlen($value) > 0 && $key != tep_session_name() && $key != 'WantsBond' && $key != 'x' && $key != 'y') {
                         $hidden_fields .= tep_draw_hidden_field($key, stripslashes($value));
                     }
                 }
             }
             $regs = array();
             preg_match_all("'<BondingSignal[^>]*?>.*?</BondingSignal>'", $_SESSION['nusoap_response'], $regs);
             $rollover = end($regs[0]);
             $rollover = strip_tags(substr($rollover, strpos($rollover, '>') + 1));
             $rollover = html_entity_decode($rollover);
             $output_title = tep_draw_form('buysafe_confirmation', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post') . tep_draw_hidden_field('WantsBond', $WantsBond ? $WantsBond : 'false') . $hidden_fields . '
       <script src="' . MODULE_ADDONS_BUYSAFE_ROLLOVER_URL . '" type="text/javascript" language="javascript" charset="utf-8"></script>
       <script language="JavaScript" type="text/javascript">
       <!--
       function buySAFEOnClick() {
         if (document.buysafe_confirmation.WantsBond.value == \'false\') {
           document.buysafe_confirmation.WantsBond.value = \'true\';
         } else {
           document.buysafe_confirmation.WantsBond.value = \'false\';
         }
         document.buysafe_confirmation.submit();
       }
       //-->
       </script>' . $rollover . '</form>';
         } else {
             $output_title = $buysafe_result['CartLineDisplayText'];
         }
         $this->output[] = array('title' => $output_title, 'text' => $buysafe_result['BondCostDisplayText'], 'value' => $buysafe_result['BondCostDisplayText'] ? $buysafe_result['TotalBondCost'] : 0);
         if ($buysafe_result['BondCostDisplayText'] && $buysafe_result['TotalBondCost']) {
             $order->info['total'] += $buysafe_result['TotalBondCost'];
         }
     }
     // end if (is_array($buysafe_result))
 }
Ejemplo n.º 19
0
 function process_button()
 {
     global $order, $currencies, $currency;
     if (MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE == 'Selected Language') {
         $my_language = 'EN';
     } else {
         $my_language = MODULE_PAYMENT_MONEYBOOKERS_LANGUAGE;
     }
     if (MODULE_PAYMENT_MONEYBOOKERS_CURRENCY == 'Selected Currency') {
         $my_currency = $currency;
     } else {
         $my_currency = substr(MODULE_PAYMENT_MONEYBOOKERS_CURRENCY, 5);
     }
     if (!in_array($my_currency, array('EUR', 'USD', 'GBP', 'HKD', 'SGD', 'JPY', 'CAD', 'AUD', 'CHF', 'DKK', 'SEK', 'NOK', 'ILS', 'MYR', 'NZD', 'TWD', 'THB', 'CZK', 'HUF', 'SKK', 'ISK', 'INR'))) {
         $my_currency = 'EUR';
     }
     $process_button_string = tep_draw_hidden_field('pay_to_email', MODULE_PAYMENT_MONEYBOOKERS_ID) . tep_draw_hidden_field('language', $my_language) . tep_draw_hidden_field('amount', number_format($order->info['total'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency', $my_currency) . tep_draw_hidden_field('detail1_description', STORE_NAME) . tep_draw_hidden_field('detail1_text', 'Order - ' . date('d. M Y - H:i')) . tep_draw_hidden_field('firstname', $order->billing['firstname']) . tep_draw_hidden_field('lastname', $order->billing['lastname']) . tep_draw_hidden_field('address', $order->billing['street_address']) . tep_draw_hidden_field('postal_code', $order->billing['postcode']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('country', $order->billing['country']['moneybookers']) . tep_draw_hidden_field('pay_from_email', $order->customer['email_address']) . tep_draw_hidden_field('return_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_url', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
     return $process_button_string;
 }
Ejemplo n.º 20
0
 function execute()
 {
     global $PHP_SELF, $currencies, $HTTP_GET_VARS, $request_type, $currency, $oscTemplate;
     if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
         if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) {
             reset($currencies->currencies);
             $currencies_array = array();
             while (list($key, $value) = each($currencies->currencies)) {
                 $currencies_array[] = array('id' => $key, 'text' => $value['title']);
             }
             $hidden_get_variables = '';
             reset($HTTP_GET_VARS);
             while (list($key, $value) = each($HTTP_GET_VARS)) {
                 if (is_string($value) && $key != 'currency' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
                     $hidden_get_variables .= tep_draw_hidden_field($key, $value);
                 }
             }
             $data = '<div class="ui-widget infoBoxContainer">' . '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_CURRENCIES_BOX_TITLE . '</div>' . '  <div class="ui-widget-content infoBoxContents">' . '    ' . tep_draw_form('currencies', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . '    ' . tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onchange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id() . '</form>' . '  </div>' . '</div>';
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
Ejemplo n.º 21
0
    }
    for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
        $modules_array[] = array('id' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.')), 'text' => substr($directory_array[$i], 0, strrpos($directory_array[$i], '.')));
    }
    ?>
      <tr>
        <td><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td><?php 
    echo tep_draw_form('newsletter', FILENAME_AFFILIATE_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&amp;' : '') . 'action=' . $form_action);
    if ($form_action == 'update') {
        echo tep_draw_hidden_field('newsletter_id', $nID);
    }
    ?>
          <table border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td class="main"><?php 
    echo TEXT_NEWSLETTER_MODULE;
    ?>
</td>
              <td class="main"><?php 
    echo tep_draw_pull_down_menu('module', $modules_array, $nInfo->module);
    ?>
</td>
            </tr>
            <tr>
              <td colspan="2"><?php 
Ejemplo n.º 22
0
	 </tr>
		 
<?php
    if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
      echo '             <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
    } else {
      echo '             <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
    }
?>
                <td >&nbsp;</td>
                <td width="15%" align="center">
                <?php
				    if (sizeof($selection) > 1) {
				      echo tep_draw_radio_field('payment', $selection[$i]['id']);
				    } else {
				      echo tep_draw_hidden_field('payment', $selection[$i]['id']);
				    }
				?>
				</td>
				<td width="10%" >&nbsp;</td>
                <td width="75%" ><b><?php echo $selection[$i]['module']; ?></b></td>
         </tr>
      

           <tr>
            <td colspan="3">&nbsp;</td>
            <td >
                <table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php
    if (isset($selection[$i]['error'])) {
Ejemplo n.º 23
0
function tep_hide_session_id()
{
    global $session_started, $SID;
    if ($session_started == true && tep_not_null($SID)) {
        return tep_draw_hidden_field(tep_session_name(), tep_session_id());
    }
}
Ejemplo n.º 24
0
<div class="page-header">
  <h1><?php 
echo MODULE_CONTENT_ACCOUNT_SET_PASSWORD_HEADING_TITLE;
?>
</h1>
</div>

<?php 
if ($messageStack->size('account_password') > 0) {
    echo $messageStack->output('account_password');
}
?>

<?php 
echo tep_draw_form('account_password', tep_href_link('ext/modules/content/account/set_password.php', '', 'SSL'), 'post', 'class="form-horizontal" role="form"', true) . tep_draw_hidden_field('action', 'process');
?>

<div class="contentContainer">
  <p class="inputRequirement text-right"><?php 
echo FORM_REQUIRED_INFORMATION;
?>
</p>

  <div class="contentText">
    <div class="form-group has-feedback">
      <label for="inputPassword" class="control-label col-xs-3"><?php 
echo ENTRY_PASSWORD_NEW;
?>
</label>
      <div class="col-xs-9">
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="smallText" align="right">
<?php 
echo tep_draw_form('search', 'action_recorder.php', '', 'get');
echo TEXT_FILTER_SEARCH . ' ' . tep_draw_input_field('search');
echo tep_draw_hidden_field('module') . tep_hide_session_id() . '</form>';
?>
                </td>
              </tr>
              <tr>
                <td class="smallText" align="right">
<?php 
echo tep_draw_form('filter', 'action_recorder.php', '', 'get');
echo tep_draw_pull_down_menu('module', $modules_list_array, null, 'onchange="this.form.submit();"');
echo tep_draw_hidden_field('search') . tep_hide_session_id() . '</form>';
?>
                </td>
              </tr>
            </table></td>
            <td class="smallText" align="right"><?php 
echo tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('action_recorder.php', 'action=expire' . (isset($HTTP_GET_VARS['module']) && in_array($HTTP_GET_VARS['module'], $modules_array) ? '&module=' . $HTTP_GET_VARS['module'] : '')), 'primary');
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
Ejemplo n.º 26
0
function showConfirmDeletePackageForm()
{
    $packages = getPackages();
    $package_name = "";
    for ($i = 0; $i < count($packages); $i++) {
        if ($packages[$i]['id'] == $_GET['id']) {
            $package_name = $packages[$i]['name'];
        }
    }
    echo "<table cellspacing='0' width='100%' cellpadding='0'> <tr><td colspan='2' class='infoBoxHeading'>" . DELETE_PACKAGE . "</td></tr></table>";
    echo tep_draw_form("confirmDeletePackage", FILENAME_PACKAGING);
    echo tep_draw_hidden_field("Action", "deletepackage");
    echo tep_draw_hidden_field("id", $_GET['id']);
    echo '<table cellpadding="5"><tr><td class="infoBoxContent">' . CONFIRM_DELETE . '</td></tr>';
    echo "<tr><td>" . $package_name . "</td></td>";
    echo "<tr><td>";
    //echo tep_image_submit('button_confirm.gif', 'ok') ;
    //    echo '<a href="' . tep_href_link( FILENAME_PACKAGING ) . '">'.tep_image_button('button_confirm.gif', IMAGE_CONFIRM) .'</a>' ;
    echo tep_image_submit('button_confirm.gif', IMAGE_CONFIRM);
    echo '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_PACKAGING) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
    echo '</td></tr></table>' . "\n";
    echo '</form>' . "\n";
}
Ejemplo n.º 27
0
 function process_button()
 {
     global $order, $currencies, $currency;
     switch (MODULE_PAYMENT_SECPAY_CURRENCY) {
         case 'Default Currency':
             $sec_currency = DEFAULT_CURRENCY;
             break;
         case 'Any Currency':
         default:
             $sec_currency = $currency;
             break;
     }
     switch (MODULE_PAYMENT_SECPAY_TEST_STATUS) {
         case 'Always Fail':
             $test_status = 'false';
             break;
         case 'Production':
             $test_status = 'live';
             break;
         case 'Always Successful':
         default:
             $test_status = 'true';
             break;
     }
     $process_button_string = tep_draw_hidden_field('merchant', MODULE_PAYMENT_SECPAY_MERCHANT_ID) . tep_draw_hidden_field('trans_id', STORE_NAME . date('Ymdhis')) . tep_draw_hidden_field('amount', number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.', '')) . tep_draw_hidden_field('bill_name', $order->billing['firstname'] . ' ' . $order->billing['lastname']) . tep_draw_hidden_field('bill_addr_1', $order->billing['street_address']) . tep_draw_hidden_field('bill_addr_2', $order->billing['suburb']) . tep_draw_hidden_field('bill_city', $order->billing['city']) . tep_draw_hidden_field('bill_state', $order->billing['state']) . tep_draw_hidden_field('bill_post_code', $order->billing['postcode']) . tep_draw_hidden_field('bill_country', $order->billing['country']['title']) . tep_draw_hidden_field('bill_tel', $order->customer['telephone']) . tep_draw_hidden_field('bill_email', $order->customer['email_address']) . tep_draw_hidden_field('ship_name', $order->delivery['firstname'] . ' ' . $order->delivery['lastname']) . tep_draw_hidden_field('ship_addr_1', $order->delivery['street_address']) . tep_draw_hidden_field('ship_addr_2', $order->delivery['suburb']) . tep_draw_hidden_field('ship_city', $order->delivery['city']) . tep_draw_hidden_field('ship_state', $order->delivery['state']) . tep_draw_hidden_field('ship_post_code', $order->delivery['postcode']) . tep_draw_hidden_field('ship_country', $order->delivery['country']['title']) . tep_draw_hidden_field('currency', $sec_currency) . tep_draw_hidden_field('callback', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . ';' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL', false)) . tep_draw_hidden_field(tep_session_name(), tep_session_id()) . tep_draw_hidden_field('options', 'test_status=' . $test_status . ',dups=false,cb_post=true,cb_flds=' . tep_session_name());
     return $process_button_string;
 }
Ejemplo n.º 28
0
 function process_button()
 {
     $hidden_fields = parent::process_button();
     return tep_draw_hidden_field('ic_paymentmethod', 'IDEAL') . $this->create_iDeal_box() . $hidden_fields;
 }
Ejemplo n.º 29
0
 function process_button()
 {
     if (MODULE_PAYMENT_PAYPAL_PRO_PAYFLOW_DP_CARD_INPUT_PAGE == 'Payment') {
         global $HTTP_POST_VARS;
         $process_button_string = tep_draw_hidden_field('cc_owner_firstname', $HTTP_POST_VARS['cc_owner_firstname']) . tep_draw_hidden_field('cc_owner_lastname', $HTTP_POST_VARS['cc_owner_lastname']) . tep_draw_hidden_field('cc_type', $HTTP_POST_VARS['cc_type']) . tep_draw_hidden_field('cc_number_nh-dns', $HTTP_POST_VARS['cc_number_nh-dns']) . tep_draw_hidden_field('cc_starts_month', $HTTP_POST_VARS['cc_starts_month']) . tep_draw_hidden_field('cc_starts_year', $HTTP_POST_VARS['cc_starts_year']) . tep_draw_hidden_field('cc_expires_month', $HTTP_POST_VARS['cc_expires_month']) . tep_draw_hidden_field('cc_expires_year', $HTTP_POST_VARS['cc_expires_year']) . tep_draw_hidden_field('cc_cvc_nh-dns', $HTTP_POST_VARS['cc_cvc_nh-dns']);
         if (isset($HTTP_POST_VARS['cc_issue_nh-dns']) && !empty($HTTP_POST_VARS['cc_issue_nh-dns'])) {
             $process_button_string .= tep_draw_hidden_field('cc_issue_nh-dns', $HTTP_POST_VARS['cc_issue_nh-dns']);
         }
         return $process_button_string;
     }
     return false;
 }
Ejemplo n.º 30
0
 function process_button()
 {
     global $HTTP_POST_VARS, $order, $currencies, $currency;
     switch (MODULE_PAYMENT_IPAYMENT_CURRENCY) {
         case 'Always EUR':
             $trx_currency = 'EUR';
             break;
         case 'Always USD':
             $trx_currency = 'USD';
             break;
         case 'Either EUR or USD, else EUR':
             if ($currency == 'EUR' || $currency == 'USD') {
                 $trx_currency = $currency;
             } else {
                 $trx_currency = 'EUR';
             }
             break;
         case 'Either EUR or USD, else USD':
             if ($currency == 'EUR' || $currency == 'USD') {
                 $trx_currency = $currency;
             } else {
                 $trx_currency = 'USD';
             }
             break;
     }
     $process_button_string = tep_draw_hidden_field('silent', '1') . tep_draw_hidden_field('trx_paymenttyp', 'cc') . tep_draw_hidden_field('trxuser_id', MODULE_PAYMENT_IPAYMENT_USER_ID) . tep_draw_hidden_field('trxpassword', MODULE_PAYMENT_IPAYMENT_PASSWORD) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('trx_currency', $trx_currency) . tep_draw_hidden_field('trx_amount', number_format($order->info['total'] * 100 * $currencies->get_value($trx_currency), 0, '', '')) . tep_draw_hidden_field('cc_expdate_month', $HTTP_POST_VARS['ipayment_cc_expires_month']) . tep_draw_hidden_field('cc_expdate_year', $HTTP_POST_VARS['ipayment_cc_expires_year']) . tep_draw_hidden_field('cc_number', $HTTP_POST_VARS['ipayment_cc_number']) . tep_draw_hidden_field('cc_checkcode', $HTTP_POST_VARS['ipayment_cc_checkcode']) . tep_draw_hidden_field('addr_name', $HTTP_POST_VARS['ipayment_cc_owner']) . tep_draw_hidden_field('addr_email', $order->customer['email_address']) . tep_draw_hidden_field('redirect_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) . tep_draw_hidden_field('silent_error_url', tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&ipayment_cc_owner=' . urlencode($HTTP_POST_VARS['ipayment_cc_owner']), 'SSL', true));
     return $process_button_string;
 }