示例#1
0
    function process_button($transactionID = 0, $key= "") {
		global $order, $currencies, $currency;

		$my_currency = strtoupper(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', gettext('Payment for ').STORE_NAME) .
					 tep_draw_hidden_field('rm', '2') .
//					 tep_draw_hidden_field('bn', 'Credits_BuyNow_WPS_'.substr($order->customer['country'],0,2)) .
//					 tep_draw_hidden_field('country', substr($order->customer['country'],0,2)) .
					 tep_draw_hidden_field('lc', LANG) .
					 tep_draw_hidden_field('charset', 'UTF-8') .
					 tep_draw_hidden_field('email', $order->customer['email_address']) .
					 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('shipping', number_format($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('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('cbt', gettext('Return to ').STORE_NAME) .
					 tep_draw_hidden_field('cancel_return', tep_href_link("userinfo.php", '', 'SSL'));

		return $process_button_string;
    }
示例#2
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;
 }
示例#3
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;
 }
示例#4
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;
 }
示例#5
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;
 }
示例#6
0
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_PRICE_INCLUDING_TAX;
?>
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_TOTAL_EXCLUDING_TAX;
?>
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
?>
</td>
      </tr>
<?php 
$decimals = $currencies->get_decimal_places($order->info['currency']);
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
    if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
        $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    } else {
        $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    }
    echo '      <tr class="dataTableRow">' . "\n" . '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
        for ($j = 0; $j < $k; $j++) {
            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
            if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
            }
            if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
                echo TEXT_INFO_ATTRIBUTE_FREE;
          <tr valign="top">
            <td colspan="2" class="main"><br><a href="#" onclick="document.getElementById('payment_table').style.display = (document.getElementById('payment_table').style.display=='none' ? 'table' : 'none'); return false;"><strong><?php 
    echo 'Сформировать ссылку на оплату заявки электронным платежом';
    ?>
</strong></a><br><br>
			<?php 
    echo tep_draw_form('payment', '#');
    ?>
<table border="0" cellspacing="0" cellpadding="2" id="payment_table" style="display: none;">
			  <tr>
				<td><?php 
    echo 'Сумма платежа:';
    ?>
</td>
				<td><?php 
    echo tep_draw_input_field('payment_sum', (string) round($total_sum, $currencies->get_decimal_places($order_info['currency'])), 'size="4" style="text-align: right;"') . 'руб.';
    ?>
</td>
			  </tr>
			  <tr>
				<td><?php 
    echo 'Описание платежа:';
    ?>
</td>
				<td><?php 
    echo tep_draw_textarea_field('payment_description', 'soft', '55', '4', 'Предоплата за иностранные товары, заявка #' . $oID);
    ?>
</td>
			  </tr>
			  <tr id="payment_link_div" style="display: none;">
				<td><?php 
    echo TABLE_HEADING_PRICE_INCLUDING_TAX;
    ?>
</td>
            <td class="dataTableHeadingContent" align="right"><?php 
    echo TABLE_HEADING_TOTAL_EXCLUDING_TAX;
    ?>
</td>
            <td class="dataTableHeadingContent" align="right"><?php 
    echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
    ?>
</td>
          </tr>
<?php 
    for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
        if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
            $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $currencies->get_decimal_places($order->info['currency'])) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
        } else {
            $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
        }
        echo '          <tr class="dataTableRow">' . "\n" . '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
        if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
            for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
                echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
                if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                    echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
                }
                if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
                    echo TEXT_INFO_ATTRIBUTE_FREE;
                }
                echo '</i></small></nobr>';
            }
示例#9
0
          <tr valign="top">
            <td colspan="2" class="main"><br><a href="#" onclick="document.getElementById('payment_table').style.display = (document.getElementById('payment_table').style.display=='none' ? 'table' : 'none'); return false;"><strong><?php 
    echo 'Сформировать ссылку на оплату заявки электронным платежом';
    ?>
</strong></a><br><br>
			<?php 
    echo tep_draw_form('payment', '#');
    ?>
<table border="0" cellspacing="0" cellpadding="2" id="payment_table" style="display: none;">
			  <tr>
				<td><?php 
    echo 'Сумма платежа:';
    ?>
</td>
				<td><?php 
    echo tep_draw_input_field('payment_sum', (string) round($total_sum, $currencies->get_decimal_places($order_info['currency'])), 'size="4" style="text-align: right;"') . 'руб.';
    ?>
</td>
			  </tr>
			  <tr>
				<td><?php 
    echo 'Описание платежа:';
    ?>
</td>
				<td><?php 
    echo tep_draw_textarea_field('payment_description', 'soft', '55', '4', 'Предоплата за заказ #' . $oID);
    ?>
</td>
			  </tr>
			  <tr id="payment_link_div" style="display: none;">
				<td><?php 
示例#10
0
            <td class="dataTableHeadingContent" width="25%"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
            <td class="dataTableHeadingContent" align="right" width="5%"><?php echo TABLE_HEADING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right" width="10%"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right" width="10%"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right" width="10%"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
            <td class="dataTableHeadingContent" align="right" width="10%"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
          </tr>
<?php
      echo '          ' . zen_draw_form('split_packing', FILENAME_PACKINGSLIP, '', 'get', 'target="_blank"', true) . "\n";
      echo '          ' . zen_draw_hidden_field('oID', (int)$oID) . "\n";
      echo '          ' . zen_draw_hidden_field('split', 'true') . "\n";
      echo '          ' . zen_draw_hidden_field('reverse_count', 0) . "\n";
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
      if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true')
      {
        $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']),$currencies->get_decimal_places($order->info['currency'])) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
      } else
      {
        $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
      }
      echo '          <tr class="dataTableRow">' . "\n";
      echo '            <td class="dataTableContent" valign="middle" align="left">' . $order->products[$i]['qty'] . '&nbsp;x&nbsp;' . $order->products[$i]['name'];
      if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
        for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
          echo '<br /><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
          if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
          if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
          echo '</i></small></nobr>';
        }
      }
      echo '            </td>' . "\n" .
示例#11
0
<?php

require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if ($action == 'generate') {
    $order_id = isset($HTTP_POST_VARS['order_id']) ? $HTTP_POST_VARS['order_id'] : '';
    $description = isset($HTTP_POST_VARS['order_desc']) ? $HTTP_POST_VARS['order_desc'] : '';
    $ot_total_value = isset($HTTP_POST_VARS['order_total']) ? $HTTP_POST_VARS['order_total'] : '';
    $currencies = new currencies();
    //$ot_total_value_usd = floor(($ot_total_value / $currencies->get_value('UAH')) * $currencies->get_value(MODULE_PAYMENT_INTERKASSA_DEFAULT_CURRENCY), $currencies->get_decimal_places(MODULE_PAYMENT_INTERKASSA_DEFAULT_CURRENCY));
    $ot_total_value_usd = number_format(tep_round($ot_total_value, $currencies->get_decimal_places('UAH')), $currencies->get_decimal_places('UAH'), '.', '');
    $ot_total_value_usd = str_replace(',', '.', $ot_total_value_usd);
    $sign = md5(MODULE_PAYMENT_INTERKASSA_LOGIN . ':' . $ot_total_value_usd . ':' . $order_id . ':' . '' . ':' . tep_session_id() . ':' . MODULE_PAYMENT_INTERKASSA_PASSWORD);
    $interkassa_link = (MODULE_PAYMENT_INTERKASSA_MODE == 'Test' ? 'https://test.interkassa.com/lib/payment.php' : 'https://interkassa.com/lib/payment.php') . '?ik_shop_id=' . urlencode(MODULE_PAYMENT_INTERKASSA_LOGIN) . '&ik_payment_amount=' . urlencode($ot_total_value_usd) . '&ik_payment_id=' . $order_id . '&ik_payment_desc=' . urlencode($description) . '&ik_baggage_fields=' . tep_session_id() . '&ik_sign_hash=' . urlencode($sign);
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo TITLE;
?>
</title>