/**
  * Show the ppBox for given price.
  *
  * @param float $price price
  * @param int   $page  KlarnaFlags page flag
  *
  * @return void
  */
 public function showPPBox($price, $page = KlarnaFlags::PRODUCT_PAGE)
 {
     if (!$this->_enabled) {
         return;
     }
     if (!KiTT_CountryLogic::isBelowLimit($this->_country, $price)) {
         return;
     }
     $templateLoader = KiTT::templateLoader($this->_locale);
     $cssLoader = $templateLoader->load('css.mustache');
     $jsLoader = $templateLoader->load('javascript.mustache');
     $merchantID = KlarnaConstant::merchantID(KiTT::PART, $this->_country);
     $styles = array("includes/external/klarna/template/css/oscstyle.css", "includes/modules/payment/klarna/productprice/style.css", EXTERNAL_KITT . "pp/v1.0/pp.css?eid=" . $merchantID);
     if (KlarnaConstant::isLegacyShop()) {
         $styles[] = "includes/external/klarna/template/css/klarna22rc2a.css";
     }
     $html = $cssLoader->render(array('styles' => $styles));
     $html .= $jsLoader->render(array("scripts" => array(EXTERNAL_KITT . "core/v1.0/js/klarna.min.js", EXTERNAL_KITT . "res/v1.0/js/klarna.lib.min.js", EXTERNAL_KITT . "pp/v1.0/js/productprice.min.js")));
     $html .= "<div style='clear: both;'></div>";
     $html .= KiTT::partPaymentBox($this->_locale, $price, $page)->show();
     return $html;
 }
 /**
  * Assert that the payment option is available
  *
  * @return bool
  */
 public function isAvailable()
 {
     $country = $this->locale->getCountryCode();
     $countryCurrency = $this->lookup->getCurrency($country);
     if ($this->locale->getCurrencyCode() !== $countryCurrency) {
         return false;
     }
     if (!$this->config->has("sales_countries/{$country}")) {
         return false;
     }
     if (!KiTT_CountryLogic::isBelowLimit($country, $this->getTotalSum())) {
         return false;
     }
     if ($this->paymentCode === KiTT::PART || $this->paymentCode === KiTT::SPEC) {
         return count($this->pclasses->pclasses) > 0;
     }
     return true;
 }