PayPal 和 Rails 的困境
所以我想使用活跃商家将 PayPal 集成到我的 Rails 应用程序中。在此应用程序中,用户正在注册其他用户正在教授的课程,并且用户需要能够相互付费才能参加该课程。
我的问题是我需要从发生的每笔交易中抽取一定比例。
那么我是否应该将所有交易支付到我的商家帐户,然后单独向每个用户付款?这看起来很疯狂,除非有办法让它自动化。有没有一种方法可以让我可以在彼此之间转移用户付款,但作为中介收取一定比例的费用?如果是这样我该怎么办?
真的被困在这里所以任何帮助将不胜感激。
So I'd like to integrate paypal into my rails app using active merchant. In this app, users are signing up for courses that other users are teaching and users need to be able to pay each other in order to take the course.
My problem is that I need to take a percentage of each transaction that occurs.
So should I have all of the transactions paid to my merchant account and then pay each user individually? That seems crazy unless there's a way to automate it. Is there maybe a way that I can transfer user payments between each other but take a percentage out as the intermediary? If so how could I do that?
Really stuck here so any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我的评论的补充:
查看我提供的评论链接中列出的 SDK。他们有一个示例 RoR 应用程序,它应该告诉您如何使用 Rails 进行各种自适应支付。请注意,此应用程序中有许多错误。看看詹姆斯对此问题的回答来解决它们:
如何我使用 Ruby 的 Paypal 自适应支付 API 避免了身份验证和时间问题?
另外,感谢您对 paypal_adaptive gem 的提醒。
编辑:这是 SDK 链接,以防万一。 https://www.x.com/developers/paypal/documentation-tools/ sdk
This is in addition to my comments:
Check out the SDK listed in the link I gave with the comments. They have a sample RoR app laid out which should tell you pretty much exactly how to do each kind of adaptive payment with Rails. Just beware that there are many errors in this application. Look at James' answer on this question to fix them:
How can I avoid auth and time issues using Paypal's Adaptive Payments API with Ruby?
Also, thanks for the heads up on the paypal_adaptive gem.
EDIT: Here's the SDK link just in case. https://www.x.com/developers/paypal/documentation-tools/sdk