Next Webinar: Maximizing Magento - Get the Most out of Promotions. Register Today!

Magento

Open Source eCommerce Evolved

Magento Forum

   
Payment method - new module tutorial
 
timothyleetaylor
Sr. Member
 
Avatar
Total Posts:  144
Joined:  2008-02-05
San Diego, CA
 

Hi All,

Here’s the latest Cash On Delivery Payment method that now includes dependency to show only if “Free Shipping Method” has been selected.

Just FYI.

Thanks,
- Lee

File Attachments
COD_PaymentMethod.zip  (File Size: 14KB - Downloads: 128)
 Signature 

Elias Interactive
Web Design & Development
http://www.eliasinteractive.com
Skype: leetaylor.elias

 
Magento Community Magento Community
Magento Community
Magento Community
 
adityak
Member
 
Total Posts:  63
Joined:  2008-02-10
India
 

My new payment method shows up in Admin/System/Configuration/Advanced but not in Payment Methods.
I’ve followed the wiki- how-to/create-payment-method-module and searched the forum, seen that a lot of other people are facing the same problem.

Can someone tell me which is the updated wiki?

 
Magento Community Magento Community
Magento Community
Magento Community
 
markus.schall
Jr. Member
 
Total Posts:  12
Joined:  2008-06-02
Reutlingen, Germany
 
adityak - 06 June 2008 11:36 PM

My new payment method shows up in Admin/System/Configuration/Advanced but not in Payment Methods.
I’ve followed the wiki- how-to/create-payment-method-module and searched the forum, seen that a lot of other people are facing the same problem.

Can someone tell me which is the updated wiki?

Hi,

same problem. I’ve copy&paste;the wiki code and don’t rename anything. I see NewModule in backend (Admin/System/Configuration/Advanced and Admin/System/Configuration/Payment Methods) and both are enabled.

In the frontend, i put something in the basket and go to checkout, but the NewModule don’t shows up

 Signature 

http://www.7thsense.de

 
Magento Community Magento Community
Magento Community
Magento Community
 
Maxumis Blade
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-06-06
Cape Town
 

I had this same problem.
I cleared cache and it worked.

deleted var/cache/*.*

 Signature 

http://www.modelbase.co.za
South African Models and Photographers

 
Magento Community Magento Community
Magento Community
Magento Community
 
adityak
Member
 
Total Posts:  63
Joined:  2008-02-10
India
 

My payment module does not show up anywhere in the admin- neither Admin/System/Configuration/Advanced nor Admin/System/Configuration/Payment Methods.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mehmath
Jr. Member
 
Total Posts:  4
Joined:  2007-10-09
 

Hi,

i have just finished my payment module. But i have to authorize the card after click “place order”. I use “validate()” function on my module method class but it validates after payment method step.
How can i validate the credit card after click “place order” like “onPlaceOrder()” ?

Note: I can do that in checkout module in validateOrder function, but it is not goog way i think ?

Sory for my bad english.

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
mehmath
Jr. Member
 
Total Posts:  4
Joined:  2007-10-09
 

Hi again,

i solved the problem, i added in config.xml

<payment_action>authorize</payment_action>
and
function authorize(....
in my model class garanti.php. It has solved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
markus.schall
Jr. Member
 
Total Posts:  12
Joined:  2008-06-02
Reutlingen, Germany
 

Hi,

i’ve solved my wiki-problem why the new payment module shows in the backend but not in the frontend. In the wiki, the part of “Payment from applicable countries” is missing, but i think it’s required

I added the following code to config.xml

<config>
    <default>
        <
payment>
            <
newmodule>
            ...
               <
allowspecific>0</allowspecific>
            ...
            </
newmodule>
        </
payment>
    </default>
<
config>

and in the system.xml between the fields-tags:

<allowspecific translate="label">
    <
label>Payment from applicable countries</label>
    <
frontend_type>allowspecific</frontend_type>
    <
sort_order>50</sort_order>
    <
source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
    <
show_in_default>1</show_in_default>
    <
show_in_website>1</show_in_website>
    <
show_in_store>1</show_in_store>
</
allowspecific>
<
specificcountry translate="label">
    <
label>Payment from Specific countries</label>
    <
frontend_type>multiselect</frontend_type>
    <
sort_order>51</sort_order>
    <
source_model>adminhtml/system_config_source_country</source_model>
    <
show_in_default>1</show_in_default>
    <
show_in_website>1</show_in_website>
    <
show_in_store>1</show_in_store>
</
specificcountry>

after that, i saved the “new” setting in the backend and then it shows in the frontend

 Signature 

http://www.7thsense.de

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrej
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-05-29
Dortmund, Germany
 

I’m trying to create a simple module for bank payment, so far I copied everythign from the wiki, modified it a little bit, so in the backend the module has everything minimal needed. But I don’t know, how to make it show up in the frontend. I looked through this thread and tried several things, but I can’t figure out, where I did something wrong.

File Attachments
BankPayment.zip  (File Size: 5KB - Downloads: 49)
 Signature 

The flag in the background of my avatar is the flag of Latvia, because this is the land where I was born. wink
Magento Modules: http://magentomodules.sourceforge.net/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrej
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-05-29
Dortmund, Germany
 

I found my error, now I’m pretty far, the payment method seems to show up properly. Now I can’t get it to read the localisation properly, is this done automatically by Magenta or do I have to specify a name for localisation cvs somewhere?

 Signature 

The flag in the background of my avatar is the flag of Latvia, because this is the land where I was born. wink
Magento Modules: http://magentomodules.sourceforge.net/

 
Magento Community Magento Community
Magento Community
Magento Community
 
schreibe
Jr. Member
 
Total Posts:  5
Joined:  2008-06-18
 

Hello,

what was the error? I have the same problem, that the payment module is not shown up in the frontend.

Greeting

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrej
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-05-29
Dortmund, Germany
 

I changed everywhere NewModule and newmodule to my own module name, but forgot to change in app/code/local/Mage/NewModule/Model/PaymentMethod.php: the class name, so it still had NewModule inside, instead of the correct module name. After I corrected it, magento had indeed something to show for this module.

 Signature 

The flag in the background of my avatar is the flag of Latvia, because this is the land where I was born. wink
Magento Modules: http://magentomodules.sourceforge.net/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrej
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-05-29
Dortmund, Germany
 

OK, in German sub-forum I got the tip to use <frontend><translate> and <adminhtml><translate>, so my localisation problems are solved, too. :-D

 Signature 

The flag in the background of my avatar is the flag of Latvia, because this is the land where I was born. wink
Magento Modules: http://magentomodules.sourceforge.net/

 
Magento Community Magento Community
Magento Community
Magento Community
 
onePack
Jr. Member
 
Total Posts:  5
Joined:  2008-06-02
Amsterdam
 

Hi there,

I was wondering if somebody can help me figure out what goes wrong in my new gateway payment module. When a customer wants to do a payment he will be redirected to the url: /checkout/onepage/
Here he gets the new form where he can leave all the customer info needed for the gatewaypayment. When the customer wants to do a checkout via the checkout button I always get a 404 page. In my form action I have given the location where the checkout.php page can be found (app\code\local\Mage\NewModule\Model\. But this will result in a access denied after checkout. Moving the file to the Onpage directory doesn’t help either. This will result in a 404 page. The new module is set up after the wiki documentation + fixes and it resides in the app local directory.. however checkout/onepage resides in the app core directory… ..is this (local and core) in conflict with each other???

Some hints will really be appreciated.

Thanx in advance,

OnePack

 
Magento Community Magento Community
Magento Community
Magento Community
 
jay77
Jr. Member
 
Total Posts:  28
Joined:  2007-10-22
 

@Mark Robinson :

Since i have installed the bank transfer method, i have the feeling my site is 3 times slower than before.
How could this happen ? and is there any way to fix it ?

Anyway thanks for sharing your code.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
39941 users|466 users currently online|85987 forum posts