Skip to content

Commit

Permalink
Import Magento 1.4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeSaferite committed Mar 24, 2010
1 parent 61c419b commit 52438d7
Show file tree
Hide file tree
Showing 118 changed files with 3,733 additions and 138 deletions.
2 changes: 1 addition & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static function getVersionInfo()
'major' => '1',
'minor' => '4',
'revision' => '0',
'patch' => '0',
'patch' => '1',
'stability' => '',
'number' => '',
);
Expand Down
50 changes: 50 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Form extends Mage_Payment_Block_Form
{
/**
* Constructor. Set template.
*/
protected function _construct()
{
parent::_construct();
$this->setTemplate('moneybookers/form.phtml');
}

/**
* Return payment logo image src
*
* @param string $payment Payment Code
* @return string|bool
*/
public function getPaymentImageSrc($payment)
{
$imageFilename = Mage::getDesign()
->getFilename('images' . DS . 'moneybookers' . DS . $payment, array('_type' => 'skin'));

if (file_exists($imageFilename . '.png')) {
return $this->getSkinUrl('images/moneybookers/' . $payment . '.png');
} else if (file_exists($imageFilename . '.gif')) {
return $this->getSkinUrl('images/moneybookers/' . $payment . '.gif');
}

return false;
}
}
51 changes: 51 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Info extends Mage_Payment_Block_Info
{
/**
* Constructor. Set template.
*/
protected function _construct()
{
parent::_construct();
$this->setTemplate('moneybookers/info.phtml');
}

/**
* Returns code of payment method
*
* @return string
*/
public function getMethodCode()
{
return $this->getInfo()->getMethodInstance()->getCode();
}

/**
* Build PDF content of info block
*
* @return string
*/
public function toPdf()
{
$this->setTemplate('moneybookers/pdf/info.phtml');
return $this->toHtml();
}
}
49 changes: 49 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Jsinit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Jsinit extends Mage_Adminhtml_Block_Template
{
/**
* Include JS in head if section is moneybookers
*/
protected function _prepareLayout()
{
$section = $this->getAction()->getRequest()->getParam('section', false);
if ($section == 'moneybookers') {
$this->getLayout()
->getBlock('head')
->addJs('mage/adminhtml/moneybookers.js');
}
parent::_prepareLayout();
}

/**
* Print init JS script into body
* @return string
*/
protected function _toHtml()
{
$section = $this->getAction()->getRequest()->getParam('section', false);
if ($section == 'moneybookers') {
return parent::_toHtml();
} else {
return '';
}
}
}
39 changes: 39 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Payment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Payment extends Mage_Core_Block_Template
{
/**
* Return Payment logo src
*
* @return string
*/
public function getMoneybookersLogoSrc()
{
$locale = Mage::getModel('moneybookers/acc')->getLocale();
$logoFilename = Mage::getDesign()
->getFilename('images' . DS . 'moneybookers' . DS . 'banner_120_' . $locale . '.png', array('_type' => 'skin'));

if (file_exists($logoFilename)) {
return $this->getSkinUrl('images/moneybookers/banner_120_'.$locale.'.png');
}

return $this->getSkinUrl('images/moneybookers/banner_120_int.png');
}
}
67 changes: 67 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Placeform.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Placeform extends Mage_Core_Block_Template
{
/**
* Return checkout session instance
*
* @return Mage_Checkout_Model_Session
*/
protected function _getCheckout()
{
return Mage::getSingleton('checkout/session');
}

/**
* Return order instance
*
* @return Mage_Sales_Model_Order|null
*/
protected function _getOrder()
{
if ($this->getOrder()) {
return $this->getOrder();
} elseif ($orderIncrementId = $this->_getCheckout()->getLastRealOrderId()) {
return Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
} else {
return null;
}
}

/**
* Get Form data by using ogone payment api
*
* @return array
*/
public function getFormData()
{
return $this->_getOrder()->getPayment()->getMethodInstance()->getFormFields();
}

/**
* Getting gateway url
*
* @return string
*/
public function getFormAction()
{
return $this->_getOrder()->getPayment()->getMethodInstance()->getUrl();
}
}
30 changes: 30 additions & 0 deletions app/code/community/Phoenix/Moneybookers/Block/Redirect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class Phoenix_Moneybookers_Block_Redirect extends Mage_Core_Block_Template
{
/**
* Constructor. Set template.
*/
protected function _construct()
{
parent::_construct();
$this->setTemplate('moneybookers/redirect.phtml');
}
}
Loading

0 comments on commit 52438d7

Please sign in to comment.