简体   繁体   English

Magento-如何在后端为自定义付款模块设置付款信息

[英]Magento - How to set Payment Information in backend for a custom Payment module

I have created a custom Payment module but I could only display the following information in the admin side of Magento 我已经创建了一个自定义的付款模块,但是我只能在Magento的管理端显示以下信息

Type of Card 卡类型

Card Number : xxxx-last 4 digits 卡号:xxxx-后4位数字

Order was placed using USD 使用美元下订单

But how can I get other details just liek in case pf Paypal like, 但是我如何获得其他详细信息,以防万一,例如Paypal,

Card Validation Status: 卡验证状态:

Address Validation Status: 地址验证状态:

Last Transaction ID: 上次交易编号:

etc. I am getting all these response from my custom payment gateway but I don't know what function to call or how to display it in the back-end for the store owner to see. 等等。我从我的自定义付款网关收到了所有这些响应,但是我不知道要调用什么函数或如何在后端将其显示给商店所有者看。

Can any one help me with this? 谁能帮我这个? Right now my payment module is doing authorize_capture as the payment action so I have Model/PaymentMethod.php which has function capture(Varien Object payment, amount) to deal with the logic. 现在,我的付款模块正在执行authorize_capture作为付款动作,因此我具有Model/PaymentMethod.php ,该文件具有function capture(Varien Object payment, amount)来处理逻辑。 So can I set the Payment Information from there or do I need to create any other files? 那么我可以从那里设置付款信息,还是需要创建其他文件?

Please let me know. 请告诉我。

EDIT: I found partial answer to what I need doing. 编辑:我发现我需要做的部分答案。

http://nicholas.piasecki.name/blog/2009/10/add-avs-and-cvn-to-magentos-admin-screen-in-just-637-easy-steps/#comment-1043 http://nicholas.piasecki.name/blog/2009/10/add-avs-and-cvn-to-magentos-admin-screen-in-just-637-easy-steps/#comment-1043

But I am not able to override a default admin template file. 但是我无法覆盖默认的管理模板文件。 This link tells to create a Block file which overrides Mage/Payment/Block/Info and set a template in there to be used. 该链接告诉您创建一个覆盖Mage / Payment / Block / Info的Block文件,并在其中设置要使用的模板。

But its not reading it. 但它没有读它。 Can some one tell me the correct way to override an admin template file so that future upgrades don't overwrite it. 有人可以告诉我重写管理模板文件的正确方法,以便将来的升级不会覆盖它。

I hope some one must be familiar with this bit now. 我希望现在一定有人对此有所了解。

it isn't taking the code from my overriden module Block file. 它没有从我覆盖的模块块文件中获取代码。 The template file I need to over ride is app/design/adminhtml/default/default/template/payment/default/info.phtml. 我需要克服的模板文件是app / design / adminhtml / default / default / template / payment / default / info.phtml。 Using the link mentioned I have already overridden Mage/Payment/Block/Info and wrote my own code but am not able to set and point towards my template. 使用提到的链接,我已经覆盖了Mage / Payment / Block / Info并编写了自己的代码,但无法设置并指向我的模板。 Any Ideas? 有任何想法吗?

Here is a good article by Alan Storm which will show you how to add settings to the backend: 这是Alan Storm的一篇好文章,它将向您展示如何向后端添加设置:

http://alanstorm.com/custom_magento_system_configuration http://alanstorm.com/custom_magento_system_configuration

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM