且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Magento自定义支付网关

更新时间:2023-11-26 23:28:10

您在system.xml中设置的值是Magento全局配置值.支付模块必须包含一个名为model的配置字段,该字段指定负责支付逻辑的PHP类.看看

The values you setup in system.xml are global Magento configuration values. Payment module's are required to include a configuration field named model, which specifies the PHP class that's responsible for payment logic. Take a look in

app/code/core/Mage/Payment/etc/system.xml

通常,模块将其设置为隐藏的配置字段,然后在config.xml中提供默认值.考虑Mage/Payment/etc/config.xml

Typically, a module makes this a hidden configuration field, and then supplies a default value in config.xml. Consider this bit of XML from Mage/Payment/etc/config.xml

<default>
    <payment>
        <ccsave>
            <active>1</active>
            <cctypes>AE,VI,MC,DI</cctypes>
            <model>payment/method_ccsave</model>
            <order_status>pending</order_status>
            <title>Credit Card (saved)</title>
            <allowspecific>0</allowspecific>
            <group>offline</group>
        </ccsave>

在这里,他们设置了payment/method_ccsave的模型.这是与PHP Model类相对应的类别名

Here they've setup a model of payment/method_ccsave. This is a class alias that corresponds to the PHP Model class

Mage_Payment_Model_Method_Ccsave

您的配置似乎缺少该类,这是您的付款选项未出现的原因之一.

You configuration appears to be missing this class, which is one reason your payment option doesn't appear.