0

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.

user229044
  • 232,980
  • 40
  • 330
  • 338
Zach
  • 1,233
  • 13
  • 19
  • I was also wondering about this exact issue -- specifically if this process can be done w/o a paypal Website Payments Pro account. The reason I'm skeptical that this is possible through W.P. Standard is because Paypal processes all transactions with the latter, as opposed to you (the merchant site). It seems ridiculous that this is such a poorly documented issue... – varatis Jan 05 '12 at 03:38
  • Zach: I just found out the name for this type of service is chained payments. Check out http://stackoverflow.com/questions/4478427/paypal-adaptivechained-payment-with-rails and https://www.x.com/developers/paypal/products/adaptive-payments [Adaptive payments is a term paypal uses for chained payments] – varatis Jan 05 '12 at 04:11
  • Me too, after much research I found that the paypal_adaptive gem is set up to handle chained payments. Although it does take some amount of hacking. And yes this is so poorly documented. – Zach Jan 06 '12 at 20:01

1 Answers1

0

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

Community
  • 1
  • 1
varatis
  • 14,494
  • 23
  • 71
  • 114