Exemplo n.º 1
0
	private function addWidgetUrlScript ($client) {
		if (!self::$widgetScriptLoaded) {
			$widgetURL = $client->getMerchantValues()->getWidgetUrl();
			JHTML::script($widgetURL, false);
			self::$widgetScriptLoaded = true;
		}

	}
Exemplo n.º 2
0
 public function plgVmonSelectedCalculatePricePayment(VirtueMartCart $cart, array &$cart_prices, &$cart_prices_name)
 {
     if (!$this->selectedThisByMethodId($cart->virtuemart_paymentmethod_id)) {
         return NULL;
         // Another method was selected, do nothing
     }
     if (!($this->_currentMethod = $this->getVmPluginMethod($cart->virtuemart_paymentmethod_id))) {
         $this->clearAmazonSession();
         return NULL;
     }
     $amazonOrderReferenceIdWeight = $this->getAmazonOrderReferenceIdWeightFromSession();
     $this->_amazonOrderReferenceId = $amazonOrderReferenceIdWeight['_amazonOrderReferenceId'];
     $referenceIdIsOnlyDigitalGoods = $amazonOrderReferenceIdWeight['isOnlyDigitalGoods'];
     $cart_prices_name = '';
     $cart_prices['cost'] = 0;
     if (!$this->checkConditions($cart, $this->_currentMethod, $cart_prices)) {
         //vmInfo('VMPAYMENT_AMAZON_PAYMENT_NOT_AVAILABLE');
         //$this->unsetCartLayoutAndPaymentMethod($cart);
         $this->leaveAmazonCheckout(vmText::_('VMPAYMENT_AMAZON_PAYMENT_NOT_AVAILABLE'));
         return FALSE;
     }
     $layout = $cart->layout;
     if ($this->shouldLoginAgain($referenceIdIsOnlyDigitalGoods, $this->isOnlyDigitalGoods($cart))) {
     } else {
         $check = self::$cartPriceUpdatedDone;
         if (!self::$cartPriceUpdatedDone) {
             $cartPriceUpdated = $this->getAmazonSalesPriceFromSession() == $cart_prices['salesPrice'] ? false : true;
             if ($cartPriceUpdated) {
                 $cart->_dataValidated = false;
                 $cart->setCartIntoSession();
             }
         }
         $this->renderAddressbookWallet($cart->_dataValidated);
     }
     $cart_prices_name = $this->renderPluginName($this->_currentMethod);
     $this->setCartPrices($cart, $cart_prices, $this->_currentMethod);
     if (!self::$cartPriceUpdatedDone) {
         $this->setSalesPriceInSession($cart_prices['salesPrice']);
     }
     self::$cartPriceUpdatedDone = true;
     return TRUE;
 }