public function init() { parent::init(); if ($this->getConfig('is_frame')) { $script = <<<CUT if (self.location.href != top.location.href) { top.location.href = self.location.href; } CUT; $this->getDi()->view->headScript()->appendScript($script); } }
public function init() { parent::init(); if ($this->isConfigured()) { require_once 'lib/Braintree.php'; Braintree_Configuration::merchantId($this->getConfig('merchant_id')); Braintree_Configuration::privateKey($this->getConfig('private_key')); Braintree_Configuration::publicKey($this->getConfig('public_key')); Braintree_Configuration::environment($this->getConfig('sandbox') ? 'sandbox' : 'production'); if ($this->getConfig('multicurrency')) { $this->getDi()->billingPlanTable->customFields()->add(new Am_CustomFieldText('braintree_merchant_account_id', "BrainTree Merchant Account ID", "please set this up if you sell products in different currencies")); } } }
public function init() { parent::init(); }