在 paypal 标准中创建两个企业帐户
谁能告诉我如何创建两个企业帐户?实际上,我想要这样的功能,如果我的购物车总额超过 100 美元,我想将其传递到我的第一个商家帐户,否则我想传递第二个商家电子邮件。我知道,这是可行的。当页面重定向到 paypal 时,我必须根据购物车总数传递不同的电子邮件。我想创建一个单独的模块,通过它我可以提供两个商家电子邮件,因此这两个输入的电子邮件都可以根据购物车总数使用。TIA,任何帮助?
Can anyone tell me how can i create two business accounts? Actually, i want functionality like this, if my cart total becomes greater than 100USD than i want to pass it to my first merchant account else want to pass second merchant email. I know, its feasible. When page is redirected to paypal i have to pass different emails based on cart total.I want to create a saparate module by which i can provide two merchant emails , so these both entered emails can be used based on cart total.TIA, any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
创建 system.xml 并粘贴
创建 config.xml 并粘贴
然后覆盖 standard.php 并声明 getStandardCheckoutFormFields() 方法,其中必须放置上面注释中所写的逻辑。您肯定会收到私有方法
_getAggreeratedCartSummary()
的错误,因此请重新定义,因为它在核心中只是范围是公共的。并完成了。Create system.xml and paste
And create config.xml and paste
Then override standard.php and declare
getStandardCheckoutFormFields()
method in which have to put logic as written in above comment. You will surely get error of private method_getAggregatedCartSummary()
so redefine as it is as in core just scope is public. And finished.查看有关使用两个 Authorize.net 帐户的最新答案 。 Paypal 的概念是相同的。在模型
Mage_Paypal_Model_Standard
中,有一个名为getConfig
的方法:这看起来是覆盖的最佳选择。此时您应该能够调用:
来获取您的报价对象。用它来决定加载哪些 Paypal 信息。将 paypal 信息保存在数据库中的备用路径下(例如
paypal/config_alt
)并根据需要返回。希望有帮助!
Take a look at this recent answer regarding using two Authorize.net accounts. The concept for Paypal is the same. In the model
Mage_Paypal_Model_Standard
, there is a method calledgetConfig
:This looks like your best bet for an override. At this point you should be able to call:
to get your quote object. Use that to decide which Paypal information to load. Save that paypal information in the database under an alternate path (say
paypal/config_alt
) and return as necessary.Hope that helps!
最后,我在 system.xml 标签后添加了
创建此并保存配置后,您可以在 core_config_data 表中看到最后设置为“paypal/general/business_account2”的路径。现在将 getStandardCheckoutFormFields() 更改为
Payment/Model/Standard.php 中的
$result = $api->getStandardCheckoutRequest();
之后,我已在 Core 文件中进行了这些更改,但正如你们所知,我必须使用本地文件夹创建它。我希望这可以帮助您。Finally,I have added in system.xml after tag as
After creating this and save config,you can see in core_config_data table that there is a path set at last as 'paypal/general/business_account2'. Now change getStandardCheckoutFormFields() as
after
$result = $api->getStandardCheckoutRequest();
in Payment/Model/Standard.php, I have made these changes in Core files, But as you all know i have to create this using local folder.I hope this may help you.