图书馆将钱存入用户帐户?
我正在构建一个应用程序,需要从通过信用卡付款的客户处收取资金,并将这笔钱存入另一个客户的银行帐户。我不想存储银行帐户信息,我只想说“将 X 美元存入用户 Y 的银行帐户”,其中 Y 呼叫第三方。该应用程序位于 Rails 中。有什么干净的解决方案吗?
I am building an app that needs to take money from a customer who is paying by credit card and deposit that money into another customer's bank account. I don't want to store the bank account info, I just want to say "deposit X dollars into user Y's bank account" where Y calls a 3rd party. The app is in rails. Any clean solutions out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想直接将资金存入 Y 的账户,您必须拥有 Y 的银行路由号码和银行帐号。
首先,您需要在 Rails 应用程序中设置 Active Merchant。使用插件或 gem:
将其安装在应用程序上后,您将需要使用网关进行注册。以下是受支持网关的完整列表 https://github.com/Shopify/active_merchant/wiki/gatewayfeaturematrix< /a>
这些 Railscast 将帮助您开始使用 Active Merchant:
http://railscasts。 com/episodes/144-active-merchant-basics
http://railscasts. com/episodes/145-integrating-active-merchant
要使用银行而不是信用卡,如果您遵循railscast,请在订单模型中创建一个新方法
You will have to have the Y's bank routing number and bank account number if you want to directly deposit funds into Y's account.
First you will need to setup Active Merchant in your rails app. Use the plugin or gem:
After you got that installed on your app you will need to sign up with a gateway. Heres a full list of supported gateways https://github.com/Shopify/active_merchant/wiki/gatewayfeaturematrix
These railscasts will get help get you started on Active Merchant:
http://railscasts.com/episodes/144-active-merchant-basics
http://railscasts.com/episodes/145-integrating-active-merchant
To use a bank instead of a credit card, create a new method in the Order model if you are following the railscast
首先选择第三方来处理您的交易。然后使用他们的 API 来完成它。例如,如果您选择 PayPal,则可以使用这些 gem(我自己没有使用过它们,因此在决定使用什么之前请检查它们):
First choose a third party to handle your transactions. And then use their API to do it. For example if you choose PayPal you can use these gems (I have not used them myself, so do check on them before you come to a decision on what to use):