【问题标题】:Magento 1 how to setup recurring payment initial fee on the fly?Magento 1 如何即时设置定期付款初始费用?
【发布时间】:2018-11-21 18:29:22
【问题描述】:

我需要在结账时设置定期付款的初始费用。这样我就可以向客户收取下订单的时间。

有谁知道怎么做或者给我指个方向吗?谢谢

【问题讨论】:

    标签: magento-1.9 recurring-billing


    【解决方案1】:

    首先,我需要明确指出,定期付款是针对默认 Magento 附带的贝宝网关进行的。我的解决方案是在 Mage_Paypal_Model_Pro.php 中更改一些方法 submitRecurringProfile。所以我用 MyCompany_ModuleName_Model_Paypal_Pro.php 覆盖它,这样我就可以对 submitRecurringProfile 进行更改而不会弄乱核心文件。

    public function submitRecurringProfile(Mage_Payment_Model_Recurring_Profile $profile,
                                           Mage_Payment_Model_Info $paymentInfo
    ) {
    
        $profile->setData('init_amount', 100);
        parent::submitRecurringProfile($profile, $paymentInfo);
    }
    

    启用about功能后,初始费用将设置为100。

    【讨论】:

      猜你喜欢
      • 2014-05-21
      • 2014-10-30
      • 2013-11-09
      • 2016-08-03
      • 2023-03-11
      • 2020-04-24
      • 2013-01-19
      • 2015-05-03
      • 2015-02-26
      相关资源
      最近更新 更多