【发布时间】:2018-11-21 18:29:22
【问题描述】:
我需要在结账时设置定期付款的初始费用。这样我就可以向客户收取下订单的时间。
有谁知道怎么做或者给我指个方向吗?谢谢
【问题讨论】:
标签: magento-1.9 recurring-billing
我需要在结账时设置定期付款的初始费用。这样我就可以向客户收取下订单的时间。
有谁知道怎么做或者给我指个方向吗?谢谢
【问题讨论】:
标签: magento-1.9 recurring-billing
首先,我需要明确指出,定期付款是针对默认 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。
【讨论】: