Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
Page 2 of 17
Payment method - new module tutorial
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

@lorenzo01: can you elaborate in what way it doesn’t function? error messages?

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
nineveh
Jr. Member
 
Total Posts:  8
Joined:  2007-10-06
 

Moshe can the tutorial for payment module be used to create a module for paypal IPN (web standard)? Is it worth bothering with now or should we wait till you guys release one yourselves in the next update?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 
Moshe - 06 October 2007 05:13 PM

@lorenzo01: can you elaborate in what way it doesn’t function? error messages?

there is no message error, but the module ‘NewModule” does not appears in the section payment method in the backend....however I applied the tutuorial strictly....i’ve did’nt saw in my database the newmodule…

 Signature 

Lorenzo, a french guy.
Sorry for my english !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2007-09-17
The Netherlands
 
lorenzo01 - 06 October 2007 01:53 PM

hello,
does the file mysql4-install-0.1.0.php function with MySQL 5.0.32 ?
because the installation of this new payment module does not function with me

Same for me, I’m also using MySQL 5.
I have followed the tutorial strictly, but the new payment module doesn’t appear.

 Signature 

.
Arno Kriek - Inline media | Internetbureau
Webdevelopment | E-commerce | Webdesign | Hosting
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

any ideas about this problem ?

 Signature 

Lorenzo, a french guy.
Sorry for my english !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Ok, found the problem… The wiki article has been updated..

So here are updates:
The code was tested on trunk with updates that didn’t make it in last release..

in app/code/local/Mage/NewModule/etc/config.xml right after </setup> line add:

<!-- specify database connection for this resource -->
        <
connection>
<!-- do 
not create new connection, use predefined core setup connection -->
          <use>
core_setup</use>
        </
connection>

This is for test gateway response:
in app/code/local/Mage/NewModule/Model/PaymentMethod.php in function _authorize add:

$response = array(
        
=> self::RESPONSE_CODE_APPROVED,
        
=> '000000',
        
=> '1234567689',
        
=> 'Y',
    );

Also there was a fix in app/code/core/Mage/Payment/Model/Paygate/Result.php:
replace Mage_Paygate_Model_Authorizenet_Result with Mage_Payment_Model_Paygate_Result.

After the module is installed in Admin / System / Config / Payment Methods / New Module:
* Enabled: for all checkout types
* Order Status: Pending
* Sort Order: 9

Let me know if that works.
Thanks

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2007-09-17
The Netherlands
 

Same problem exists, the new payment module doesn’t show up in the admin page.
No errors at all. Maybe you can post the exact copy of your files, so we can try those out?
Maybe we are doing something wrong.

 Signature 

.
Arno Kriek - Inline media | Internetbureau
Webdevelopment | E-commerce | Webdesign | Hosting
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Place attached files in these locations:

Result.php: app/code/core/Mage/Payment/Model/Paygate/Result.php

config.xml: app/code/local/Mage/NewPayment/etc/config.xml

Method.php: app/code/local/Mage/NewPayment/Model/Method.php

mysql4-install-0.1.0.php: app/code/local/Mage/NewPayment/sql/newpayment_setup

Following files can be different for you, so they will need an update:

In app/etc/local.xml add this before </config>:

<modules>
        <
Mage_NewPayment>
            <
active>true</active>
            <
codePool>local</codePool>
        </
Mage_NewPayment>
     </
modules>

in app/Mage.php right after /** Include path */ replace ini_set statement with:

ini_set('include_path'ini_get('include_path')
    .
PS.BP.'/lib'
    
.PS.BP.'/app/code/core'
    
.PS.BP.'/app/code/local'
    
.PS.BP.'/app/code/community'
);

File Attachments
Result.php  (File Size: 1KB - Downloads: 256)
config.xml  (File Size: 2KB - Downloads: 219)
Method.php  (File Size: 5KB - Downloads: 250)
mysql4-install-0.1.0.php  (File Size: 2KB - Downloads: 243)
 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Let me know if that works

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2007-09-17
The Netherlands
 
Moshe - 08 October 2007 02:03 PM

Let me know if that works

Thanks Moshe! I’ll try this out this afternoon. I’ll let you know!

 Signature 

.
Arno Kriek - Inline media | Internetbureau
Webdevelopment | E-commerce | Webdesign | Hosting
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2007-09-17
The Netherlands
 

@Moshe, I just tried it out. I uploaded all the files and changed the other files exactly as you described.
I went to admin/configuration/Payment Methods.......... and nothing......
There is no new Payment module showing. downer

 Signature 

.
Arno Kriek - Inline media | Internetbureau
Webdevelopment | E-commerce | Webdesign | Hosting
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

just to make sure - can you remove files in var/cache/config/* and retry ?

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2007-09-17
The Netherlands
 
Moshe - 09 October 2007 07:47 AM

just to make sure - can you remove files in var/cache/config/* and retry ?

Done, but it didn’t helped.
Maybe it has to do something with my php or sql version?
I’m using the following versions:

PHP 5.2.3
MYsql 5.0.27

 Signature 

.
Arno Kriek - Inline media | Internetbureau
Webdevelopment | E-commerce | Webdesign | Hosting
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Anyone could make it work?

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

Finally, it just worked for me smile

Make sure you exactly follow the path to store the new files, as they have changed since the tutorial.
Among other things, the directory NewModule under app/code/local/Mage became NewPayment

Also, I think the files Moshe attached in the forum are missing the ?> PHP ending tag. This applies for the PHP files in the WIKI tutorial as well.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 17
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
196234 users|1196 users currently online|366685 forum posts