Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Phoenix_Moneybookers_Block_Form
  • Phoenix_Moneybookers_Block_Info
  • Phoenix_Moneybookers_Block_Jsinit
  • Phoenix_Moneybookers_Block_Payment
  • Phoenix_Moneybookers_Block_Placeform
  • Phoenix_Moneybookers_Block_Redirect
  • Phoenix_Moneybookers_Helper_Data
  • Phoenix_Moneybookers_Model_Abstract
  • Phoenix_Moneybookers_Model_Acc
  • Phoenix_Moneybookers_Model_Csi
  • Phoenix_Moneybookers_Model_Did
  • Phoenix_Moneybookers_Model_Dnk
  • Phoenix_Moneybookers_Model_Ebt
  • Phoenix_Moneybookers_Model_Ent
  • Phoenix_Moneybookers_Model_Event
  • Phoenix_Moneybookers_Model_Gcb
  • Phoenix_Moneybookers_Model_Gir
  • Phoenix_Moneybookers_Model_Idl
  • Phoenix_Moneybookers_Model_Lsr
  • Phoenix_Moneybookers_Model_Mae
  • Phoenix_Moneybookers_Model_Npy
  • Phoenix_Moneybookers_Model_Obt
  • Phoenix_Moneybookers_Model_Pli
  • Phoenix_Moneybookers_Model_Psp
  • Phoenix_Moneybookers_Model_Pwy
  • Phoenix_Moneybookers_Model_Sft
  • Phoenix_Moneybookers_Model_So2
  • Phoenix_Moneybookers_Model_Wlt
  • Phoenix_Moneybookers_MoneybookersController
  • Phoenix_Moneybookers_ProcessingController
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Magento
 4:  *
 5:  * NOTICE OF LICENSE
 6:  *
 7:  * This source file is subject to the Open Software License (OSL 3.0)
 8:  * that is bundled with this package in the file LICENSE.txt.
 9:  * It is also available through the world-wide-web at this URL:
10:  * http://opensource.org/licenses/osl-3.0.php
11:  * If you did not receive a copy of the license and are unable to
12:  * obtain it through the world-wide-web, please send an email
13:  * to license@magentocommerce.com so we can send you a copy immediately.
14:  *
15:  * @category    Phoenix
16:  * @package     Phoenix_Moneybookers
17:  * @copyright   Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
19:  */
20: class Phoenix_Moneybookers_Block_Form extends Mage_Payment_Block_Form
21: {
22:     /**
23:      * Available locales for content URL generation
24:      *
25:      * @var array
26:      */
27:     protected $_supportedInfoLocales = array('de');
28: 
29:     /**
30:      * Default locale for content URL generation
31:      *
32:      * @var string
33:      */
34:     protected $_defaultInfoLocale = 'en';
35: 
36:     /**
37:      * Constructor. Set template.
38:      */
39:     protected function _construct()
40:     {
41:         parent::_construct();
42:         $this->setTemplate('moneybookers/form.phtml');
43:     }
44: 
45:     /**
46:      * Return payment logo image src
47:      *
48:      * @param string $payment Payment Code
49:      * @return string|bool
50:      */
51:     public function getPaymentImageSrc($payment)
52:     {
53:         if ($payment == 'moneybookers_obt') {
54:             $payment .= '_'.$this->getInfoLocale();
55:         }
56:     
57:         $imageFilename = Mage::getDesign()
58:             ->getFilename('images' . DS . 'moneybookers' . DS . $payment, array('_type' => 'skin'));
59: 
60:         if (file_exists($imageFilename . '.png')) {
61:             return $this->getSkinUrl('images/moneybookers/' . $payment . '.png');
62:         } else if (file_exists($imageFilename . '.gif')) {
63:             return $this->getSkinUrl('images/moneybookers/' . $payment . '.gif');
64:         }
65: 
66:         return false;
67:     }
68: 
69:     /**
70:      * Return supported locale for information text
71:      *
72:      * @return string
73:      */
74:     public function getInfoLocale()
75:     {
76:         $locale = substr(Mage::app()->getLocale()->getLocaleCode(), 0 ,2);
77:         if (!in_array($locale, $this->_supportedInfoLocales)) {
78:             $locale = $this->_defaultInfoLocale;
79:         }
80:         return $locale;
81:     }
82: 
83:     /**
84:      * Return info URL for eWallet payment
85:      *
86:      * @return string
87:      */
88:     public function getWltInfoUrl()
89:     {
90:         $locale = substr(Mage::app()->getLocale()->getLocaleCode(), 0 ,2);
91:         return 'http://www.moneybookers.com/app/?l=' . strtoupper($locale);
92:     }
93: }
94: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0