当前位置: 首页>>代码示例>>PHP>>正文


PHP currencies::get_decimal_places方法代码示例

本文整理汇总了PHP中currencies::get_decimal_places方法的典型用法代码示例。如果您正苦于以下问题:PHP currencies::get_decimal_places方法的具体用法?PHP currencies::get_decimal_places怎么用?PHP currencies::get_decimal_places使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在currencies的用法示例。


在下文中一共展示了currencies::get_decimal_places方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: strtoupper

    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;
    }
开发者ID:nixonch,项目名称:a2billing,代码行数:30,代码来源:paypal.php

示例2: process_button

 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;
 }
开发者ID:saydulk,项目名称:a2billing,代码行数:11,代码来源:paypal.php

示例3: currencies

 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;
 }
开发者ID:sayemk,项目名称:a2billing,代码行数:11,代码来源:paypal.php

示例4: currencies

 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;
 }
开发者ID:sayemk,项目名称:a2billing,代码行数:12,代码来源:moneybookers.php

示例5: strtoupper

 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;
 }
开发者ID:hellbound,项目名称:a2billing-mod,代码行数:18,代码来源:moneybookers.php

示例6:

</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;
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:invoice.php

示例7: round

          <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 
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:advance_orders.php

示例8:

    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>';
            }
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:orders_mod_phreebooks.php

示例9:

            <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" .
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:orders.php

示例10: isset

<?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>
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:interkassa.php


注:本文中的currencies::get_decimal_places方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。