質問

I want to pay my users(share profit) automatically every month using PayPal.

I read a lot about PayPal and all features. I need to configure sending payments depends on some statistics from my database.

I'm using Rails and will appreciate all any help !

Can I rewrite or change something in recurrung bills gem to pay my users ?

役に立ちましたか?

解決

There are several scheduling gems for this purpose:

https://www.ruby-toolbox.com/categories/scheduling

他のヒント

If you are using a payment gateway such as paypal, they have support for reccuring billing. Most payment services support this. I don't know if it is possible to set up a timer like you describe in the question, but I would definitely not rely on it. What about performance and what if your app goes down?

Take a look at activemerchant and this railscasts episode. Maybe this paypal documentation is helpful too.

On the PayPal product family, take a look at Adaptive Payments. One of the features is the ability to do what's called Implicit Payments. Essentially this feature givves you the ability to programmatically send money out of your own account, to pay somebody else.

You simply need to write the script to determine the receiver's email address, the amount you want to send them, and make the API call with that information.

Check out page 25: https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf

Although it's probably easier to write your own API call (It's basically and HTTP POST request, with some additional headers), you could probably tweak the ActiveMerchant library to do it for you.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top