Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error when configuring new payment module
 
al_st
Jr. Member
 
Total Posts:  7
Joined:  2008-03-10
 

Hi,

I’m currently in the process of configuring a module for Magento and Securetrading, who are a UK based payment service provider.

The system I wish to implement initially is for ST Payment Pages, where the customer is transferred from the merchant’s webserver onto the Securetrading servers in order to input their card details.

I have been working on modifying the existing Authorize.net’s model (core/Mage/Paygate/Model/Authorizenet.php), specifically the _buildRequest function, as I am initially trying to build the string to be used for the http post onto Securetrading’s servers, which will then be used in the _postRequest function to send the information.

I’ve modified the code to include the information I require, however when pressing the “Place Order” button, I am receiving a “undefined” error message. Using Firefox’s firebug, the error I am receiving is:

Fatal error:  Call to a member function beginTransaction() on a non-object in /var/www/magento/app/code/core/Mage/Core/Model/Abstract.php on line 224

I’ve attached my module to this e-mail, if anyone knows why I’m receiving this message I’ll be very grateful!!! I’ve been looking at it all day today, and can’t seem to find where I’m going wrong.

There’s a long way to go before I’ll have finished this module, although I’d like to be able to get the post setup quite quickly as I’d like to setup a module for the STXPay system as well. At present I’m ignoring the fact that the module is still accepting the card details on the merchant’s server, as I’m focusing on setting up the post to the servers first.

If there’s any additional information you need, please let me know.

Additionally, are there any technical specifications going to be made available for setting up payment modules once Magento goes into production?

Thanks.

File Attachments
SecureTrading.zip  (File Size: 14KB - Downloads: 84)
 
Magento Community Magento Community
Magento Community
Magento Community
 
al_st
Jr. Member
 
Total Posts:  7
Joined:  2008-03-10
 

Ok,

I’ve got a bit further now, although the customer is still not being transferred onto the SecureTrading servers.

Please find my updated module. I am still receiving a “undefined” message when pressing the “Place Order” button, although looking at Firefox’s firebug, the connection is made to the securetrading servers, and the html of the page is being picked up, however the user is not being relayed/redirected onto the Securetrading servers.

This is probably something basic that I’m missing out, but I want it to perform the same as a http post would do from a HTML form.

Any help would be greatfully appreciated.

- Also, congratulations on the release, looks great! I just hope I can add SecureTrading as a payment option as soon as possible!

File Attachments
SecureTrading.zip  (File Size: 46KB - Downloads: 80)
 
Magento Community Magento Community
Magento Community
Magento Community
 
bolasevich
Sr. Member
 
Avatar
Total Posts:  235
Joined:  2008-03-04
Newington, CT USA
 

Does this work on 1.0… i loaded it and nothing shows up in payment methods.. what verision is this being developed on?

 
Magento Community Magento Community
Magento Community
Magento Community
 
al_st
Jr. Member
 
Total Posts:  7
Joined:  2008-03-10
 

Hi bolasevich,

I’ve installed 1.0, cleared the cache (/var/www/magento/var/cache), installed the module and “SecureTrading Payment Pages” is appearing as a payment method within the backend under System->Configuration->Payment Methods.

The Securetrading folder should be saved under /var/www/magento/app/code/local/Mage, and the Securetrading.xml file should be saved under /var/www/magento/app/etc/modules.

This should then show up for you, thanks for taking the time to have a look at this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
LindyKyaw
Sr. Member
 
Avatar
Total Posts:  138
Joined:  2008-01-02
Los Angeles
 

Hi,

You have inconsistent naming schema for Model/SecureTrading.

If you try to use capital name for Model/SecureTrading, you need to change the way you call model.

Need to use as

Mage::getModel('securetrading/secureTrading_debug')

instead of

Mage::getModel('securetrading/securetrading_debug')

For Request.php, you write the class name as Mage_SecureTrading_Model_Securetrading_Request instead of Mage_SecureTrading_Model_SecureTrading_Request

For one page checkout, please use Firefox firebug to debug ajax.

There are notices error in _postRequest method.

Please check the attachment.

File Attachments
SecureTrading.zip  (File Size: 43KB - Downloads: 99)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top