IG_PostePay - Version 1.0.0

Version Notes

Enjoy it ;)

Download this release

Release Info

Developer Magento Core Team
Extension IG_PostePay
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/IG/PostePay/Block/Form.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class IG_PostePay_Block_Form extends Mage_Payment_Block_Form
3
+ {
4
+ protected function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->setTemplate('ig_postepay/form.phtml');
8
+ }
9
+
10
+ public function getPaymentImageSrc()
11
+ {
12
+ if (file_exists(Mage::getDesign()->getSkinBaseDir().'/images/ig_postepay/logo.png'))
13
+ return $this->getSkinUrl('images/ig_postepay/logo.png');
14
+
15
+ if (file_exists(Mage::getDesign()->getSkinBaseDir().'/images/ig_postepay/logo.gif'))
16
+ return $this->getSkinUrl('images/ig_postepay/logo.gif');
17
+
18
+ return false;
19
+ }
20
+ }
21
+ ?>
app/code/community/IG/PostePay/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ class IG_PostePay_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ }
6
+ ?>
app/code/community/IG/PostePay/Model/Postepay.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class IG_PostePay_Model_Postepay extends Mage_Payment_Model_Method_Abstract
3
+ {
4
+ protected $_code = 'ig_postepay';
5
+ protected $_paymentMethod = 'ig_postepay';
6
+ protected $_store_config = 'payment/ig_postepay';
7
+ protected $_formBlockType = 'ig_postepay/form';
8
+
9
+ protected $_isGateway = false;
10
+ protected $_canAuthorize = true;
11
+ protected $_canCapture = false;
12
+ protected $_canCapturePartial = false;
13
+ protected $_canRefund = false;
14
+ protected $_canVoid = true;
15
+ protected $_canUseInternal = false;
16
+ protected $_canUseCheckout = true;
17
+ protected $_canUseForMultishipping = false;
18
+
19
+ public function getConfig($key)
20
+ {
21
+ return Mage::getStoreConfig($this->_store_config.'/'.$key);
22
+ }
23
+ }
24
+ ?>
app/code/community/IG/PostePay/etc/config.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <IG_PostePay>
4
+ <version>1.0.0</version>
5
+ </IG_PostePay>
6
+ </modules>
7
+
8
+ <global>
9
+ <helpers>
10
+ <ig_postepay>
11
+ <class>IG_PostePay_Helper</class>
12
+ </ig_postepay>
13
+ </helpers>
14
+ <blocks>
15
+ <ig_postepay>
16
+ <class>IG_PostePay_Block</class>
17
+ </ig_postepay>
18
+ </blocks>
19
+ <models>
20
+ <ig_postepay>
21
+ <class>IG_PostePay_Model</class>
22
+ </ig_postepay>
23
+ </models>
24
+ <resources>
25
+ <ig_postepay_setup>
26
+ <setup>
27
+ <module>IG_PostePay</module>
28
+ </setup>
29
+ <connection>
30
+ <use>core_setup</use>
31
+ </connection>
32
+ </ig_postepay_setup>
33
+
34
+ <ig_postepay_write>
35
+ <connection>
36
+ <use>core_write</use>
37
+ </connection>
38
+ </ig_postepay_write>
39
+
40
+ <ig_postepay_read>
41
+ <connection>
42
+ <use>core_read</use>
43
+ </connection>
44
+ </ig_postepay_read>
45
+ </resources>
46
+ </global>
47
+
48
+ <frontend>
49
+ <translate>
50
+ <modules>
51
+ <ig_postepay>
52
+ <files>
53
+ <default>IG_PostePay.csv</default>
54
+ </files>
55
+ </ig_postepay>
56
+ </modules>
57
+ </translate>
58
+ </frontend>
59
+
60
+ <adminhtml>
61
+ <translate>
62
+ <modules>
63
+ <ig_postepay>
64
+ <files>
65
+ <default>IG_PostePay.csv</default>
66
+ </files>
67
+ </ig_postepay>
68
+ </modules>
69
+ </translate>
70
+ </adminhtml>
71
+
72
+ <default>
73
+ <payment>
74
+ <ig_postepay>
75
+ <active>1</active>
76
+ <model>ig_postepay/postepay</model>
77
+ <order_status>pending</order_status>
78
+ <title>Ricarica PostePay</title>
79
+ <payment_action>authorize</payment_action>
80
+ <allowspecific>1</allowspecific>
81
+ <specificcountry>IT</specificcountry>
82
+ <creditcard>4023-6004-XXXX-XXXX</creditcard>
83
+ <creditholder>Mario Rossi</creditholder>
84
+ <freetext>Scrivi qui le tue note aggiuntive.</freetext>
85
+ </ig_postepay>
86
+ </payment>
87
+ </default>
88
+
89
+ </config>
app/code/community/IG/PostePay/etc/system.xml ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <ig_postepay translate="label" module="ig_postepay">
7
+ <label>PostePay recharge</label>
8
+ <sort_order>10</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <fields>
13
+ <active translate="label">
14
+ <label>Use PostePay recharge</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>10</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ </active>
22
+ <title translate="label">
23
+ <label>Title</label>
24
+ <frontend_type>text</frontend_type>
25
+ <sort_order>20</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>0</show_in_store>
29
+ </title>
30
+ <order_status translate="label">
31
+ <label>New order status</label>
32
+ <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
34
+ <sort_order>30</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>0</show_in_store>
38
+ </order_status>
39
+ <allowspecific translate="label">
40
+ <label>Payment from applicable countries</label>
41
+ <frontend_type>allowspecific</frontend_type>
42
+ <sort_order>40</sort_order>
43
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>0</show_in_store>
47
+ </allowspecific>
48
+ <specificcountry translate="label">
49
+ <label>Payment from Specific countries</label>
50
+ <frontend_type>multiselect</frontend_type>
51
+ <sort_order>50</sort_order>
52
+ <source_model>adminhtml/system_config_source_country</source_model>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>0</show_in_store>
56
+ </specificcountry>
57
+ <creditcard translate="label">
58
+ <label>Your PostePay Card Number</label>
59
+ <comment>This will be displayed in payment page</comment>
60
+ <frontend_type>text</frontend_type>
61
+ <sort_order>60</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>0</show_in_store>
65
+ </creditcard>
66
+ <creditholder translate="label">
67
+ <label>Your PostePay Card Holder</label>
68
+ <comment>This will be displayed in payment page</comment>
69
+ <frontend_type>text</frontend_type>
70
+ <sort_order>70</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ </creditholder>
75
+ <freetext translate="label">
76
+ <label>Free text</label>
77
+ <frontend_type>textarea</frontend_type>
78
+ <sort_order>80</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>0</show_in_store>
82
+ </freetext>
83
+ </fields>
84
+ </ig_postepay>
85
+ </groups>
86
+ </payment>
87
+ </sections>
88
+ </config>
app/design/frontend/default/default/template/ig_postepay/form.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_code = $this->getMethodCode();
3
+ $_method = $this->getMethod();
4
+ $_img = $this->getPaymentImageSrc();
5
+ ?>
6
+ <fieldset class="form-list">
7
+ <?php if ($_img) { ?>
8
+ <div style="position: relative; left: 14em; top: -2.5em"><a href="http://www.poste.it/" target="_blank"><img src="<?php echo $_img ?>" alt="" /></a></div>
9
+ <?php } ?>
10
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none;">
11
+ <?php if ($_method->getConfig('creditcard') != '') { ?>
12
+ <li>
13
+ <?php echo Mage::helper('ig_postepay')->__('Card number to recharge') ?>: <strong><?php echo htmlspecialchars($_method->getConfig('creditcard')) ?></strong>
14
+ </li>
15
+ <?php } ?>
16
+ <?php if ($_method->getConfig('creditholder') != '') { ?>
17
+ <li>
18
+ <?php echo Mage::helper('ig_postepay')->__('Credit card holder') ?>: <strong><?php echo htmlspecialchars($_method->getConfig('creditholder')) ?></strong>
19
+ </li>
20
+ <?php } ?>
21
+ <?php if ($_method->getConfig('freetext') != '') { ?>
22
+ <li>
23
+ <small><?php echo nl2br(htmlspecialchars($_method->getConfig('freetext'))) ?></small>
24
+ </li>
25
+ <?php } ?>
26
+ </ul>
27
+ </fieldset>
app/etc/modules/IG_PostePay.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <IG_PostePay>
4
+ <active>true</active>
5
+ <codePool>community</codePool>
6
+ <depends>
7
+ <Mage_Payment />
8
+ </depends>
9
+ </IG_PostePay>
10
+ </modules>
11
+ </config>
app/locale/en_US/IG_PostePay.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ "PostePay recharge","PostePay recharge"
2
+ "Use PostePay recharge","Use PostePay recharge"
3
+ "Your PostePay Card Number","Your PostePay Card Number"
4
+ "Your PostePay Card Holder","Your PostePay Card Holder"
5
+ "This will be displayed in payment page","This will be displayed in payment page"
6
+ "Free text","Free text"
7
+ "Card number to recharge","Card number to recharge"
8
+ "Credit card holder","Credit card holder"
app/locale/it_IT/IG_PostePay.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ "PostePay recharge","Ricarica PostePay"
2
+ "Use PostePay recharge","Attiva ricarica PostePay"
3
+ "Your PostePay Card Number","La tua carta di credito"
4
+ "Your PostePay Card Holder","Nome del titolare della carta"
5
+ "This will be displayed in payment page","Questo verr&agrave; mostrato nella pagina di pagamento"
6
+ "Free text","Note aggiuntive"
7
+ "Card number to recharge","Numero carta da ricaricare"
8
+ "Credit card holder","Titolare della carta"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>IG_PostePay</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.idealiagroup.com/magento-modules-license.html">Community</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Modulo per ricevere pagamenti via ricarica PostePay.</summary>
10
+ <description>Modulo molto semplice e pronto all'uso per ricevere pagamenti con ricariche postepay.</description>
11
+ <notes>Enjoy it ;)</notes>
12
+ <authors><author><name>Riccardo Tempesta</name><user>auto-converted</user><email>tempesta@idealiagroup.com</email></author><author><name>Marco Giorgetti</name><user>auto-converted</user><email>giorgetti@idealiagroup.com</email></author></authors>
13
+ <date>2009-09-23</date>
14
+ <time>04:41:29</time>
15
+ <contents><target name="magelocale"><dir name="en_US"><file name="IG_PostePay.csv" hash="abe9cc312a947f76ece88f897df0da09"/></dir><dir name="it_IT"><file name="IG_PostePay.csv" hash="141b557dc8ce312b311a995de3113184"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="ig_postepay"><file name="logo.png" hash="d64f101cb7d964caeb7a007ba134a327"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="ig_postepay"><file name="form.phtml" hash="59217b3de8b5e0621b84d314f88a09ca"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="IG"><dir name="PostePay"><dir name="Block"><file name="Form.php" hash="117863d84645588b44b551a3bd8e4736"/></dir><dir name="etc"><file name="config.xml" hash="4def7ca83764b5c5acb0558262e2db5e"/><file name="system.xml" hash="128558f80b85ad5e4f6796a3f2735209"/></dir><dir name="Helper"><file name="Data.php" hash="bc7149e2cc77e1e2191fca711ee986c1"/></dir><dir name="Model"><file name="Postepay.php" hash="20bb888997447b5ddd965e1c0ed51e5e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="IG_PostePay.xml" hash="7feb712df5d00b003b85a681db6e045f"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>
skin/frontend/default/default/images/ig_postepay/logo.png ADDED
Binary file