Magento Forum

   
Payment method - new module tutorial
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  130
Joined:  2007-09-17
The Netherlands
 
jsperri - 09 October 2007 11:15 PM

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.

I followed the exact tutorial and double checked it just now, but still it doesn’t work for me. :(
Can you tell me what PHP and mySQL version you are using?

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

My software versions, both are Debian Packages:
Mysql 5.0.45
PHP 5.2.0-8

I don’t think there could be a Mysql version issue, as the code for the new module does not seem to be specific to a certain mysql version,
even if the filename mysql4-install-0.1.0.php would let you think the contrary…

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

It’s freaking me out, what can be my problem....

Can you perhaps post your files or a screenshot of the directory and file structure of app/code/local/Mage/ ?
Maybe I’m overlooking something here, so I can compare it with my situation.

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

it’s ok for me thanks Moshe

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

The closing ?> tags are ommited on purpose, they are optional and can cause problems with unintentional trailing spaces and new lines. Actually it’s in the coding standard of Zend Framework.

jsperri - 09 October 2007 11:15 PM

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
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

bluemotion:
In case your problem with the new module is not fixed yet, I have attached a zip containing all the necessary files.
All you need to do is unzip it inside your Magento home.
This archive is made to be used with latest Magento (ver. 0.6.13110) as this new release contains most of the other core files fixed to work with the tutorial.

The only other file to change is app/etc/local.xml where you need to add before </config>:

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

File Attachments
NewPayment.zip  (File Size: 5KB - Downloads: 679)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Inline Media
Sr. Member
 
Avatar
Total Posts:  130
Joined:  2007-09-17
The Netherlands
 

@jesperri, I have uploaded your files and ques what? It works!
Many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bombo
Member
 
Total Posts:  32
Joined:  2007-10-10
 

Hey,

Can this be used to create module for PayPal Standard? How much more is still missing?

Niv

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

Is the payment tutorial still working for you on latest release (ver. 0.6.13700) ?

I have reinstalled Magento from scratch, no files from previous release have been kept and I can’t get either the tutorial from the WIKI ( http://www.magentocommerce.com/wiki/how-to/create-payment-method-module ) or the tutorial from this thread to work anymore.  I don’t get SQL code executed so the new payment method is not added to the backend.

Everything was working fine on previous release (0.6.13110)

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrben
Jr. Member
 
Total Posts:  2
Joined:  2007-11-17
 

After reading this tutorial I’ve now got a skeleton Protx Direct payment module working grin
How do I override Mage_Payment_Block_Info_Cc::getCcTypes(), and also control the display of certain provider-specific attributes (e.g. to show the Protx Transaction ID on the admin order screen). I think the solution might be to implement my own payment block class, but I don’t know where the hooks are. Any pointers?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sam Boson
Jr. Member
 
Avatar
Total Posts:  24
Joined:  2007-11-15
 

Hi I’ve tried walking through the tutorial in preparation for implementing a new payment block as the payment provider we are using don’t provide an API based structure, however I’m falling at the first hurdle.

Unlike a lot of the others here I do have the payment method showing up in the Admin section but it isn’t showing up on the frontend, any ideas? any questions?

I have created the NewPayment dir tree under Mage, and added the module to first local.xml and then after reading the forum config.xml and had no luck under either.

The payment method is set for all checkouts, pending and order 9.

Regards,

Sam

 
Magento Community Magento Community
Magento Community
Magento Community
 
directzi
Jr. Member
 
Total Posts:  8
Joined:  2007-11-22
 

Is there anyway to grab the CVV code?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dessol
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2007-12-05
 

Does anyone have a working Protx module?

 
Magento Community Magento Community
Magento Community
Magento Community
 
gremlin
Jr. Member
 
Total Posts:  4
Joined:  2007-12-11
 

Hi guys.
After deploying the NewPayment.zip in the /magento, when i go in the admin/configuration/payment_methods I get the output below. Any of you had it so far? Any fixes?
Tnx

Fatal error: Call to a member function toOptionArray() on a non-object in C:\xamp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 126

 
Magento Community Magento Community
Magento Community
Magento Community
 
gremlin
Jr. Member
 
Total Posts:  4
Joined:  2007-12-11
 

smile found the problem:
in the install sql should be

'source_model'=>'adminhtml/system_config_source_yesno'

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top