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


PHP vmPSPlugin::getAmountValueInCurrency方法代码示例

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


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

示例1: setTotal

 /**
  * @param $total
  */
 public function setTotal($total)
 {
     if (!class_exists('CurrencyDisplay')) {
         require JPATH_VM_ADMINISTRATOR . '/helpers/currencydisplay.php';
     }
     $this->total = vmPSPlugin::getAmountValueInCurrency($total, $this->_method->payment_currency);
     $cd = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:11,代码来源:klikandpay.php

示例2: getRecurringDeposit

 /**
  * Après versement d’un acompte immédiat, le solde à payer est divisé en 1, 2, ... 6 fois
  * dont la date anniversaire peut être différente de celle du paiement immédiat.
  * Chaque échéance pour le paiement du solde sera présentée à 1 mois d’intervalle à la date anniversaire définie
  * si elle est différente du paiement initial.
  *
  * Indiquer une valeur pour la variable MONTANT qui sera immédiatement présentée en banque,
  * MONTANT2 le montant du solde.
  * EXTRA, le nombre d’échéances souhaitées.
  *
  *
  * OU
  *     * Paiement d’un acompte immédiat et paiement du solde à une date définie.
  *
  * Indiquer le montant à débiter immédiatement dans la variable MONTANT,
  * le solde à débiter dans MONTANT2 et
  * indiquer la date pour le paiement du solde dans la variable DATE2.
  *
  * @param $totalInPaymentCurrency
  */
 function getRecurringDeposit()
 {
     $totalInPaymentCurrency = $this->getTotal();
     if (preg_match('/%$/', $this->_method->recurring_deposit)) {
         $deposit = substr($this->_method->recurring_deposit, 0, -1);
         $recurring_deposit = $totalInPaymentCurrency * $deposit * 0.01;
     } else {
         $recurring_deposit = $this->_method->recurring_deposit;
         if (!class_exists('CurrencyDisplay')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
         }
         $recurring_deposit = vmPSPlugin::getAmountValueInCurrency($recurring_deposit, $this->_method->payment_currency);
         $cd = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
     }
     $montant_currency = vmPSPlugin::getAmountInCurrency($recurring_deposit, $this->_method->payment_currency);
     $montant2_currency = vmPSPlugin::getAmountInCurrency($totalInPaymentCurrency - $recurring_deposit, $this->_method->payment_currency);
     $cd = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
     $recurring["MONTANT"] = number_format($recurring_deposit, 2, '.', '');
     $recurring["MONTANT2"] = $montant2_currency['value'];
     if ($this->_method->recurring_number > 2) {
         $recurring["EXTRA"] = $this->_method->recurring_number - 1 . "FOIS";
     }
     if ($this->_method->recurring_date) {
         $recurring["DATE2"] = $this->getNextTermDate();
     }
     $recurring["info"] = vmText::sprintf('VMPAYMENT_KLIKANDPAY_COMMENT_RECURRING_DEPOSIT', $this->_method->recurring_number, $montant_currency['display']);
     return $recurring;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:48,代码来源:recurring.php

示例3: addPrices

 function addPrices(&$post_variables)
 {
     $paymentCurrency = CurrencyDisplay::getInstance($this->_method->payment_currency);
     $i = 1;
     // Product prices
     if ($this->cart->products) {
         foreach ($this->cart->products as $key => $product) {
             $post_variables["item_name_" . $i] = $this->getItemName($product->product_name);
             if ($product->product_sku) {
                 $post_variables["item_number_" . $i] = $product->product_sku;
             }
             $post_variables["amount_" . $i] = $this->getProductAmount($this->cart->cartPrices[$key]);
             $post_variables["quantity_" . $i] = $product->quantity;
             $i++;
         }
     }
     $post_variables["handling_cart"] = $this->getHandlingAmount();
     $post_variables["handling_cart"] += vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['salesPriceShipment'], $this->_method->payment_currency);
     $post_variables['currency_code'] = $this->currency_code_3;
     if (!empty($this->cart->cartPrices['salesPriceCoupon'])) {
         $post_variables['discount_amount_cart'] = abs(vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['salesPriceCoupon'], $this->_method->payment_currency));
     }
     $pricesCurrency = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:24,代码来源:paypalstd.php

示例4: addPrices

 /**
  * https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
  * @param $post_variables
  */
 function addPrices(&$post_variables)
 {
     $paymentCurrency = CurrencyDisplay::getInstance($this->_method->payment_currency);
     $i = 0;
     $taxAmount = 0;
     $total = 0;
     // Product prices
     if ($this->cart->products) {
         foreach ($this->cart->products as $key => $product) {
             $post_variables["L_PAYMENTREQUEST_0_NAME" . $i] = $this->getItemName($product->product_name);
             if ($product->product_sku) {
                 $post_variables["L_PAYMENTREQUEST_0_NUMBER" . $i] = $product->product_sku;
             }
             $post_variables["L_PAYMENTREQUEST_0_AMT" . $i] = $this->getProductAmount($this->cart->pricesUnformatted[$key]);
             $post_variables["L_PAYMENTREQUEST_0_QTY" . $i] = $product->quantity;
             $total += $post_variables["L_PAYMENTREQUEST_0_AMT" . $i] * $post_variables["L_PAYMENTREQUEST_0_QTY" . $i];
             $i++;
         }
     }
     // Handling Coupon (handling must be positive value, add then coupon as a product with negative value
     if (!empty($this->cart->pricesUnformatted['salesPriceCoupon'])) {
         $post_variables["L_PAYMENTREQUEST_0_NAME" . $i] = vmText::_('COM_VIRTUEMART_COUPON_DISCOUNT') . ': ' . $this->cart->couponCode;
         $post_variables["L_PAYMENTREQUEST_0_AMT" . $i] = vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceCoupon'], $this->_method->payment_currency);
         $post_variables["L_PAYMENTREQUEST_0_QTY" . $i] = 1;
         $total += $post_variables["L_PAYMENTREQUEST_0_AMT" . $i] * $post_variables["L_PAYMENTREQUEST_0_QTY" . $i];
     }
     $post_variables["PAYMENTREQUEST_0_ITEMAMT"] = $total;
     $salesPriceShipment = vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceShipment'], $this->_method->payment_currency);
     if ($salesPriceShipment >= 0) {
         $post_variables["PAYMENTREQUEST_0_SHIPPINGAMT"] = $salesPriceShipment;
     } else {
         $post_variables["PAYMENTREQUEST_0_SHIPDISCAMT"] = $salesPriceShipment;
     }
     $total += $salesPriceShipment;
     $handling = $this->getHandlingAmount();
     $post_variables["PAYMENTREQUEST_0_HANDLINGAMT"] = $handling;
     $total += $handling;
     $post_variables['PAYMENTREQUEST_0_AMT'] = $total;
     $post_variables['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->currency_code_3;
     $pricesCurrency = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
 }
开发者ID:spiridonov-oa,项目名称:SheinCandles,代码行数:45,代码来源:paypalexp.php

示例5: getTotalInPaymentCurrency

	/**
	 * @param $client
	 * @param $total
	 * @param $backToPricesCurrency
	 * @return array
	 */
	private function getTotalInPaymentCurrency ($client, $total, $backToPricesCurrency) {
		if (!class_exists('CurrencyDisplay')) {
			require(JPATH_VM_ADMINISTRATOR . '/helpers/currencydisplay.php');
		}
		$virtuemart_currency_id = $this->getCurrencyId($client);
		$totalInPaymentCurrency = vmPSPlugin::getAmountValueInCurrency($total, $virtuemart_currency_id);
		//$this->debugLog($totalInPaymentCurrency, __FUNCTION__, 'debug');

		$cd = CurrencyDisplay::getInstance($backToPricesCurrency);

		return $totalInPaymentCurrency;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:18,代码来源:amazon.php

示例6: addPrices

 /**
  * @param $post_variables
  */
 function addPrices(&$post_variables)
 {
     $paymentCurrency = CurrencyDisplay::getInstance($this->_method->payment_currency);
     $i = 1;
     $taxAmount = 0;
     $ITEMAMT = 0;
     $TAXAMT = 0;
     $lastId = 0;
     // Product prices
     if ($this->cart->products) {
         foreach ($this->cart->products as $key => $product) {
             $post_variables["L_NAME" . $i] = $this->getItemName($product->product_name);
             if ($product->product_sku) {
                 $post_variables["L_NUMBER" . $i] = $product->product_sku;
             }
             $post_variables["L_AMT" . $i] = $this->getProductAmountWithoutTax($this->cart->cartPrices[$key]);
             $post_variables["L_QTY" . $i] = $product->quantity;
             $post_variables["L_TAXAMT" . $i] = $this->getProductTaxAmount($this->cart->cartPrices[$key]);
             // Item sales tax
             $taxAmount += $post_variables["L_TAXAMT" . $i];
             $ITEMAMT += $post_variables["L_AMT" . $i] * $post_variables["L_QTY" . $i];
             $TAXAMT += $post_variables["L_TAXAMT" . $i];
             $lastId = $i;
             $i++;
         }
     }
     // Handling Coupon (handling must be positive value, add then coupon as a product with negative value
     if (!empty($this->cart->cartPrices['salesPriceCoupon'])) {
         $post_variables["L_NAME" . $i] = tsmText::_('COM_VIRTUEMART_COUPON_DISCOUNT') . ': ' . $this->cart->couponCode;
         $post_variables["L_AMT" . $i] = vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['salesPriceCoupon'], $this->_method->payment_currency);
         $post_variables["L_QTY" . $i] = 1;
         $ITEMAMT += $post_variables["L_AMT" . $i] * $post_variables["L_QTY" . $i];
         //$TAXAMT +=$post_variables["L_TAXAMT" . $i];
     }
     if ($this->cart->cartPrices['paymentValue']) {
         $paymentValue = vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['paymentValue'], $this->_method->payment_currency);
         $post_variables["L_NAME" . $i] = tsmText::_('COM_VIRTUEMART_PAYMENT');
         $post_variables["L_AMT" . $i] = $paymentValue;
         $post_variables["L_TAXAMT" . $i] = vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['paymentTax'], $this->_method->payment_currency);
         // Item sales tax
         $post_variables["L_QTY" . $i] = 1;
         $ITEMAMT += $post_variables["L_AMT" . $i] * $post_variables["L_QTY" . $i];
         $TAXAMT += $post_variables["L_TAXAMT" . $i];
         $lastId = $i;
     }
     // shipment value must include tax
     $shipmentValue = vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['salesPriceShipment'], $this->_method->payment_currency);
     if ($shipmentValue >= 0) {
         $post_variables["SHIPPINGAMT"] = $shipmentValue;
         // Total shipping costs for this order.
     } else {
         $post_variables["SHIPDISCAMT"] = $shipmentValue;
         // Shipping discount for this order, specified as a negative number.
     }
     $handling = $this->getHandlingAmount();
     $post_variables["HANDLINGAMT"] = $handling;
     $post_variables['CURRENCYCODE'] = $this->currency_code_3;
     $post_variables['AMT'] = $this->total;
     $post_variables['TAXAMT'] = $TAXAMT;
     // Sum of tax for all items in this order.
     //$post_variables['ITEMAMT'] = vmPSPlugin::getAmountValueInCurrency($this->cart->cartPrices['priceWithoutTax'], $this->_method->payment_currency);
     $post_variables['ITEMAMT'] = $ITEMAMT;
     $pricesCurrency = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:67,代码来源:paypalapi.php

示例7: addPrices

	/**
	 * https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
	 * @param $post_variables
	 */
	function addPrices(&$post_variables) {

		$paymentCurrency = CurrencyDisplay::getInstance($this->_method->payment_currency);
		$i = 0;
		$taxAmount = 0;
		// Product prices
		if ($this->cart->products) {
			foreach ($this->cart->products as $key => $product) {
				$post_variables["L_PAYMENTREQUEST_0_NAME" . $i] = $this->getItemName($product->product_name);
				if ($product->product_sku) {
					$post_variables["L_PAYMENTREQUEST_0_NUMBER" . $i] = $product->product_sku;
				}
				$post_variables["L_PAYMENTREQUEST_0_AMT" . $i] = $this->getProductAmount($this->cart->pricesUnformatted[$key]);
				$post_variables["L_PAYMENTREQUEST_0_QTY" . $i] = $product->quantity;
				$i++;
			}
		}

		$post_variables["PAYMENTREQUEST_0_ITEMAMT"] = vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPrice'], $this->_method->payment_currency);
		$salesPriceShipment = vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceShipment'], $this->_method->payment_currency);
		if ($salesPriceShipment >= 0) {
			$post_variables["PAYMENTREQUEST_0_SHIPPINGAMT"] = $salesPriceShipment;
		} else {
			$post_variables["PAYMENTREQUEST_0_SHIPDISCAMT"] = $salesPriceShipment;
		}

		$handling = $this->getHandlingAmount();
		if (!empty($this->cart->pricesUnformatted['salesPriceCoupon'])) {
			$handling += vmPSPlugin::getAmountValueInCurrency($this->cart->pricesUnformatted['salesPriceCoupon'], $this->_method->payment_currency);
		}
		$post_variables["PAYMENTREQUEST_0_HANDLINGAMT"] = $handling;
		$post_variables['PAYMENTREQUEST_0_AMT'] = $this->total;
		$post_variables['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->currency_code_3;

		$pricesCurrency = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
	}
开发者ID:sergy444,项目名称:joomla,代码行数:40,代码来源:paypalexp.php

示例8: setTotalInPaymentCurrency

 public function setTotalInPaymentCurrency($total)
 {
     if (!class_exists('CurrencyDisplay')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     $this->total = vmPSPlugin::getAmountValueInCurrency($total, $this->_method->payment_currency) * 100;
     $cd = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:8,代码来源:helper.php


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