I'm using the Magento ver. 1.6.2.0
I've read the official guide for create new Payment Methods: http://www.magentocommerce.com/wiki/5_-_modules_and_development/payment/create-payment-method-module
in directory app/etc/modules
i've created this xml file MyName_MyModule
:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyName_MyModule>
<active>true</active>
<codePool>local</codePool>
</MyName_MyModule>
</modules>
In app/code/local
i've created this folders MyName/MyModule
and: MyName/MyModule/etc
MyName/MyModule/Model
inside MyName/MyModule/etc
there is(config.xml):
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyName_MyModule>
<version>0.1.0</version>
</MyName_MyModule>
</modules>
<global>
<models>
<mymodule>
<class>MyName_MyModule_Model</class>
</mymodule>
</models>
<resources>
<mymodule_setup>
<setup>
<module>MyName_MyModule</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</mymodule_setup>
<mymodule_write>
<connection>
<use>core_write</use>
</connection>
</mymodule_write>
<mymodule_read>
<connection>
<use>core_read</use>
</connection>
</mymodule_read>
</resources>
</global>
and system.xml:
<?xml version="1.0"?>
<config>
<sections>
<payment>
<groups>
<mymodule translate="label" module="payment">
<label>My Module</label>
<sort_order>670</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<fields>
<active translate="label">
<label>Enabled</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</active>
<title translate="label">
<label>Title</label>
<frontend_type>text</frontend_type>
<sort_order>6</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</title>
</fields>
</mymodule>
</groups>
</payment>
</sections>
The problem is:
I see the payment method in the panel administration also i see it in system / advanced
when i enable the payment method and try to buy something, i can't see it in Payment Information!
I see only 2 radio buttons:
Check / Money order
Credit Card (saved)
Cache cleared manually, and disabled from administration panel.
Added Default:
<!-- declare default configuration values for this module -->
<default>
<!-- 'payment' configuration section (tab) -->
<payment>
<!-- 'newmodule' configuration group (fieldset) -->
<mymodule>
<!-- by default this payment method is inactive -->
<active>1</active>
<!-- model to handle logic for this payment method -->
<model>mymodule/paymentMethod</model>
<!-- order status for new orders paid by this payment method -->
<order_status>pending</order_status>
<!-- default title for payment checkout page and order view page -->
<title>My Module</title>
<payment_action>authorize</payment_action>
<allowspecific>0</allowspecific>
</mymodule>
</payment>
</default>
Still doesn't work!