Electronic_Funds_Transfer - Version 1.0.0

Version Notes

Stable Release

Download this release

Release Info

Developer Dev
Extension Electronic_Funds_Transfer
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Rtgs/Pay/Block/Form/Pay.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Rtgs_Pay_Block_Form_Pay extends Mage_Payment_Block_Form
3
+ {
4
+ protected function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->setTemplate('pay/form/pay.phtml');
8
+ }
9
+ }
app/code/local/Rtgs/Pay/Block/Info/Pay.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Rtgs_Pay_Block_Info_Pay extends Mage_Payment_Block_Info
3
+ {
4
+ protected function _prepareSpecificInformation($transport = null)
5
+ {
6
+ if (null !== $this->_paymentSpecificInformation) {
7
+ return $this->_paymentSpecificInformation;
8
+ }
9
+ $info = $this->getInfo();
10
+ $transport = new Varien_Object();
11
+ $transport = parent::_prepareSpecificInformation($transport);
12
+ $transport->addData(array(
13
+ Mage::helper('payment')->__('Transaction No#') => $info->getTransactionNo()
14
+ ));
15
+ return $transport;
16
+ }
17
+ }
app/code/local/Rtgs/Pay/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Rtgs_Pay_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Rtgs/Pay/Model/Pay.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Rtgs_Pay_Model_Pay extends Mage_Payment_Model_Method_Abstract
3
+ {
4
+ protected $_code = 'pay';
5
+ protected $_formBlockType = 'pay/form_pay';
6
+ protected $_infoBlockType = 'pay/info_pay';
7
+
8
+ public function assignData($data)
9
+ {
10
+ if (!($data instanceof Varien_Object)) {
11
+ $data = new Varien_Object($data);
12
+ }
13
+
14
+ $info = $this->getInfoInstance();
15
+ $info->setTransactionNo($data->getTransactionNo());
16
+ return $this;
17
+ }
18
+
19
+
20
+ public function validate()
21
+ {
22
+ parent::validate();
23
+
24
+ $info = $this->getInfoInstance();
25
+ $no = $info->getTransactionNo();
26
+
27
+ if(empty($no)){
28
+ $errorCode = 'invalid_data';
29
+ $errorMsg = $this->_getHelper()->__('Transaction No is required fields');
30
+ }
31
+
32
+ if($errorMsg){
33
+ Mage::throwException($errorMsg);
34
+ }
35
+
36
+ return $this;
37
+ }
38
+ }
39
+ ?>
app/code/local/Rtgs/Pay/etc/config.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Rtgs_Pay>
5
+ <version>0.1.0</version>
6
+ </Rtgs_Pay>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <pay>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Rtgs_Pay</module>
14
+ <frontName>pay</frontName>
15
+ </args>
16
+ </pay>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <pay>
21
+ <file>pay.xml</file>
22
+ </pay>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <models>
28
+ <pay>
29
+ <class>Rtgs_Pay_Model</class>
30
+ <resourceModel>pay_mysql4</resourceModel>
31
+ </pay>
32
+ <pay_mysql4>
33
+ <class>Rtgs_Pay_Model_Mysql4</class>
34
+ <entities>
35
+ <pay>
36
+ <table>pay</table>
37
+ </pay>
38
+ </entities>
39
+ </pay_mysql4>
40
+ </models>
41
+ <resources>
42
+ <pay_setup>
43
+ <setup>
44
+ <module>Rtgs_Pay</module>
45
+ </setup>
46
+ <connection>
47
+ <use>core_setup</use>
48
+ </connection>
49
+ </pay_setup>
50
+ <pay_write>
51
+ <connection>
52
+ <use>core_write</use>
53
+ </connection>
54
+ </pay_write>
55
+ <pay_read>
56
+ <connection>
57
+ <use>core_read</use>
58
+ </connection>
59
+ </pay_read>
60
+ </resources>
61
+ <blocks>
62
+ <pay>
63
+ <class>Rtgs_Pay_Block</class>
64
+ </pay>
65
+ </blocks>
66
+ <helpers>
67
+ <pay>
68
+ <class>Rtgs_Pay_Helper</class>
69
+ </pay>
70
+ </helpers>
71
+ <fieldsets>
72
+ <sales_convert_quote_payment>
73
+ <transaction_no>
74
+ <to_order_payment>*</to_order_payment>
75
+ </transaction_no>
76
+ </sales_convert_quote_payment>
77
+ </fieldsets>
78
+ </global>
79
+ <default>
80
+ <payment>
81
+ <pay>
82
+ <active>1</active>
83
+ <model>pay/pay</model>
84
+ <order_status>processing</order_status>
85
+ <title>RTGS/NEFT Payment Method</title>
86
+ </pay>
87
+ </payment>
88
+ </default>
89
+ </config>
app/code/local/Rtgs/Pay/etc/system.xml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <pay translate="label" module="pay">
7
+ <label>RTGS/NEFT Payment Module</label>
8
+ <sort_order>720</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <fields>
13
+ <active translate="label">
14
+ <label>Enabled</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>0</show_in_store>
21
+ </active>
22
+ <order_status translate="label">
23
+ <label>New order status</label>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
26
+ <sort_order>2</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>0</show_in_store>
30
+ </order_status>
31
+ <title translate="label">
32
+ <label>Title</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>3</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
+ </title>
39
+ </fields>
40
+ </pay>
41
+ </groups>
42
+ </payment>
43
+ </sections>
44
+ </config>
app/code/local/Rtgs/Pay/sql/pay_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("
5
+
6
+ ALTER TABLE `{$installer->getTable('sales/quote_payment')}` ADD `transaction_no` VARCHAR( 255 ) NOT NULL ;
7
+
8
+ ALTER TABLE `{$installer->getTable('sales/order_payment')}` ADD `transaction_no` VARCHAR( 255 ) NOT NULL ;
9
+
10
+ ");
11
+ $installer->endSetup();
12
+
app/design/frontend/default/em0006/template/pay/form/pay.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+
4
+ $_code = $this->getMethodCode();
5
+ $beneficiaryName = Mage::getModel('core/variable')->loadByCode(BNF_NAME)->getValue();
6
+ $beneficiaryBankDetails = Mage::getModel('core/variable')->loadByCode(BNF_BANK_DETAILS)->getValue();
7
+ $beneficiaryAccountNo = Mage::getModel('core/variable')->loadByCode(BNF_ACCOUNT_NO)->getValue();
8
+ $beneficiaryIfscCode = Mage::getModel('core/variable')->loadByCode(BNF_IFSC_CODE)->getValue();
9
+
10
+ ?>
11
+ <div>
12
+ <table>
13
+ <tr>
14
+ <ul class="form-list" id="payment_form">
15
+ <li>
16
+ <h1>Beneficiary Details</h1>
17
+ <label><h5>Name :</h5></label>
18
+ <span>&nbsp;<?php echo $beneficiaryName ?></span>
19
+ </li>
20
+ <li>
21
+ <label><h5>Bank Name & Address :</h5></label>
22
+ <span>&nbsp;<?php echo $beneficiaryBankDetails ?></span>
23
+ </li>
24
+ <li>
25
+ <label><h5>Bank Account No :</h5></label>
26
+ <span>&nbsp;<?php echo $beneficiaryAccountNo ?></span>
27
+ </li>
28
+ <li>
29
+ <label><h5>Bank IFSC Code :</h5></label>
30
+ <span>&nbsp;<?php echo $beneficiaryIfscCode ?></span>
31
+ </li>
32
+ </ul>
33
+ </tr>
34
+ </table>
35
+ </div>
36
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
37
+ <li>
38
+ <label for="<?php echo $_code ?>_transaction_no" class="required"><em>*</em><?php echo $this->__('Transaction No#') ?></label>
39
+ <span class="input-box">
40
+ <input type="text" title="<?php echo $this->__('Transaction No#') ?>" class="input-text required-entry" id="<?php echo $_code ?>_transaction_no" name="payment[transaction_no]" value="<?php echo $this->htmlEscape($this->getInfoData('transaction_no')) ?>" />
41
+ </span>
42
+ </li>
43
+ </ul>
app/etc/modules/Rtgs_Pay.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Rtgs_Pay>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Rtgs_Pay>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Electronic_Funds_Transfer</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Provide Electronic Funds Transer like NEFT or RTGS</summary>
10
+ <description>Provide Electronic Funds Transfer by entering the Transaction Number on the Checkout Page.</description>
11
+ <notes>Stable Release</notes>
12
+ <authors><author><name>Dev</name><user>Dev4u</user><email>workdesk4u@gmail.com</email></author></authors>
13
+ <date>2013-05-30</date>
14
+ <time>07:38:26</time>
15
+ <contents><target name="magelocal"><dir name="Rtgs"><dir name="Pay"><dir name="Block"><dir name="Form"><file name="Pay.php" hash="488ef98783f512986654a2be20a66766"/></dir><dir name="Info"><file name="Pay.php" hash="45b0af4f4d86241ada74a33bd4891bc7"/></dir></dir><dir name="Helper"><file name="Data.php" hash="3e40fed52b36000ca5bcea9caf385060"/></dir><dir name="Model"><file name="Pay.php" hash="9ac22d2359d18e49a5fb4a3683205d5a"/></dir><dir name="etc"><file name="config.xml" hash="7731d31214501e765a8ebad25fbeb2ea"/><file name="system.xml" hash="56aee6b813d8459712abb506a53252bd"/></dir><dir name="sql"><dir name="pay_setup"><file name="mysql4-install-0.1.0.php" hash="8b63362cf355c08ea5208052ecf34873"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="em0006"><dir name="template"><dir name="pay"><dir><dir name="form"><file name="pay.phtml" hash="f7a8d939560e8859328a68113d1654d1"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rtgs_Pay.xml" hash="1a06cb7060056e9266eec14e81e38e28"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>