-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
299 changed files
with
4,097 additions
and
1,563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
@@ -26,7 +26,7 @@ protected function _construct() | |
|
||
$logoURL = $this->_checkAndGetSkinUrl($this->getConfigData('module_logo')); | ||
|
||
if (! Mage::helper('payzen')->isAdmin() && $logoURL) { | ||
if (! $this->_getHelper()->isAdmin() && $logoURL) { | ||
$logo = Mage::getConfig()->getBlockClassName('core/template'); | ||
$logo = new $logo; | ||
$logo->setTemplate('payzen/logo.phtml'); | ||
|
@@ -45,7 +45,7 @@ protected function _checkAndGetSkinUrl($fileName) | |
} | ||
|
||
$filePath = Mage::getBaseDir('media') . DS . 'payzen' . DS . 'logos' . DS . $fileName; | ||
if (! file_exists($filePath)) { | ||
if (! $this->_getHelper()->fileExists($filePath)) { | ||
return false; | ||
} | ||
|
||
|
@@ -57,7 +57,7 @@ public function getCcTypeImageSrc($card) | |
$card = strtolower($card); | ||
|
||
$path = Mage::getBaseDir('media') . DS . 'payzen' . DS . 'ct' . DS . $card . '.png'; | ||
if (file_exists($path)) { | ||
if ($this->_getHelper()->fileExists($path)) { | ||
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'payzen/ct/' . $card . '.png'; | ||
} else { | ||
return false; | ||
|
@@ -73,4 +73,14 @@ public function getConfigData($name) | |
{ | ||
return $this->_getModel()->getConfigData($name); | ||
} | ||
|
||
/** | ||
* Return payzen data helper. | ||
* | ||
* @return Lyra_Payzen_Helper_Data | ||
*/ | ||
protected function _getHelper() | ||
{ | ||
return Mage::helper('payzen'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
@@ -19,7 +19,8 @@ | |
/** | ||
* Custom renderer for the PayZen category mapping field. | ||
*/ | ||
class Lyra_Payzen_Block_Field_CategoryMapping extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CategoryMapping | ||
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
{ | ||
public function __construct() | ||
{ | ||
|
@@ -28,7 +29,7 @@ public function __construct() | |
array( | ||
'label' => Mage::helper('payzen')->__('Magento category'), | ||
'style' => 'width: 200px;', | ||
'renderer' => new Lyra_Payzen_Block_Field_Column_Label | ||
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label | ||
) | ||
); | ||
|
||
|
@@ -38,7 +39,7 @@ public function __construct() | |
array( | ||
'label' => Mage::helper('payzen')->__('PayZen category'), | ||
'style' => 'width: 200px;', | ||
'renderer' => new Lyra_Payzen_Block_Field_Column_List($options) | ||
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_List($options) | ||
) | ||
); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
@@ -19,7 +19,8 @@ | |
/** | ||
* Custom renderer for the PayZen customer group options field. | ||
*/ | ||
class Lyra_Payzen_Block_Field_Choozeo_CustgroupOptions extends Lyra_Payzen_Block_Field_CustgroupOptions | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_CustgroupOptions | ||
extends Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions | ||
{ | ||
public function __construct() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
@@ -19,7 +19,8 @@ | |
/** | ||
* Custom renderer for the PayZen customer group options field. | ||
*/ | ||
class Lyra_Payzen_Block_Field_Choozeo_PaymentOptions extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_PaymentOptions | ||
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
{ | ||
public function __construct() | ||
{ | ||
|
@@ -28,7 +29,7 @@ public function __construct() | |
array( | ||
'label' => Mage::helper('payzen')->__('Label'), | ||
'style' => 'width: 260px;', | ||
'renderer' => new Lyra_Payzen_Block_Field_Column_Label | ||
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label | ||
) | ||
); | ||
$this->addColumn( | ||
|
43 changes: 43 additions & 0 deletions
43
app/code/community/Lyra/Payzen/Block/Adminhtml/System/Config/Field/Column/EditableLabel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is licensed under the Open Software License version 3.0 | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
*/ | ||
|
||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_EditableLabel extends Mage_Core_Block_Abstract | ||
{ | ||
protected function _toHtml() | ||
{ | ||
$html = '<div'; | ||
$html .= ' class="' . ($this->column['class'] ? $this->column['class'] : 'input-text') . '"'; | ||
$html .= ' style="'. ($this->column['style'] ? ' ' . $this->column['style'] : '') . '"'; | ||
$html .= '>'; | ||
|
||
$html .= '<input class="input-text" type="text" value="#{label}" name="' . $this->inputName | ||
. '" style="width: 210px;">'; | ||
|
||
$codeInputName = str_replace($this->columnName, 'code', $this->inputName); | ||
$html .= '<input type="text" value="#{code}" name="' . $codeInputName | ||
. '" style="width: 0px; display: none;">'; | ||
|
||
$countInputName = str_replace($this->columnName, 'count', $this->inputName); | ||
$html .= '<input type="text" value="#{count}" name="' . $countInputName | ||
. '" style="width: 0px; display: none;">'; | ||
|
||
$html .= '</div>'; | ||
|
||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,13 +10,13 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
*/ | ||
|
||
class Lyra_Payzen_Block_Field_Column_Label extends Mage_Core_Block_Abstract | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label extends Mage_Core_Block_Abstract | ||
{ | ||
protected function _toHtml() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,13 +10,13 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
*/ | ||
|
||
class Lyra_Payzen_Block_Field_Column_List extends Mage_Core_Block_Abstract | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_List extends Mage_Core_Block_Abstract | ||
{ | ||
protected function _toHtml() | ||
{ | ||
|
42 changes: 42 additions & 0 deletions
42
app/code/community/Lyra/Payzen/Block/Adminhtml/System/Config/Field/CtxMode.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is licensed under the Open Software License version 3.0 | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
*/ | ||
|
||
/** | ||
* Custom renderer for the context mode field. | ||
*/ | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CtxMode extends Mage_Adminhtml_Block_System_Config_Form_Field | ||
{ | ||
/** | ||
* Render field HTML. | ||
* | ||
* @param Varien_Data_Form_Element_Abstract $element | ||
* @return string | ||
*/ | ||
public function render(Varien_Data_Form_Element_Abstract $element) | ||
{ | ||
// get configured features | ||
$features = Lyra_Payzen_Helper_Data::$pluginFeatures; | ||
|
||
if ($features['qualif']) { | ||
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); | ||
$element->setDisabled(true); | ||
} | ||
|
||
return parent::render($element); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.8.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
|
@@ -10,7 +10,7 @@ | |
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2017 Lyra Network and contributors | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
|
@@ -19,7 +19,8 @@ | |
/** | ||
* Custom renderer for the PayZen customer group options field. | ||
*/ | ||
class Lyra_Payzen_Block_Field_CustgroupOptions extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions | ||
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | ||
{ | ||
protected $_default = array(); | ||
|
||
|
@@ -30,7 +31,7 @@ public function __construct() | |
array( | ||
'label' => Mage::helper('payzen')->__('Customer group'), | ||
'style' => 'width: 260px;', | ||
'renderer' => new Lyra_Payzen_Block_Field_Column_Label | ||
'renderer' => new Lyra_Payzen_Block_Adminhtml_System_Config_Field_Column_Label | ||
) | ||
); | ||
$this->addColumn( | ||
|
31 changes: 31 additions & 0 deletions
31
...ode/community/Lyra/Payzen/Block/Adminhtml/System/Config/Field/Fullcb/CustgroupOptions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* PayZen V2-Payment Module version 1.9.0 for Magento 1.4-1.9. Support contact : [email protected]. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is licensed under the Open Software License version 3.0 | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @author Lyra Network (http://www.lyra-network.com/) | ||
* @copyright 2014-2018 Lyra Network and contributors | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @category payment | ||
* @package payzen | ||
*/ | ||
|
||
/** | ||
* Custom renderer for the PayZen customer group options field. | ||
*/ | ||
class Lyra_Payzen_Block_Adminhtml_System_Config_Field_Fullcb_CustgroupOptions | ||
extends Lyra_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->_default = array('amount_min' => '100', 'amount_max' => '1500'); | ||
} | ||
} |
Oops, something went wrong.