Call-back icon  Sales: Call 800.374.8146 (N America)|757.278.0920 (International)

Magento

Open Source eCommerce Evolved

Magento Forum

   
Page 2 of 14
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:  158
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:  94
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 

Kind Regards,

Arno Kriek - Inline media
Moderator Dutch Magento Community

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  158
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:  94
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 

Kind Regards,

Arno Kriek - Inline media
Moderator Dutch Magento Community

 
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: 113)
config.xml  (File Size: 2KB - Downloads: 99)
Method.php  (File Size: 5KB - Downloads: 111)
mysql4-install-0.1.0.php  (File Size: 2KB - Downloads: 107)
 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:  94
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 

Kind Regards,

Arno Kriek - Inline media
Moderator Dutch Magento Community

 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline media
Sr. Member
 
Avatar
Total Posts:  94
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 

Kind Regards,

Arno Kriek - Inline media
Moderator Dutch Magento Community

 
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:  94
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 

Kind Regards,

Arno Kriek - Inline media
Moderator Dutch Magento Community

 
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:  104
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 14
 
Sales: Call 800.374.8146 (North America) 757.278.0920 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
33676 users|408 users currently online|74652 forum posts