Forum: Ruby on Rails Paypal on Rails Question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5c2806560a56cf727689b669ba948ba9?d=identicon&s=25 Adam J. (Guest)
on 2007-02-15 21:28
Hey All,

I'm working on a small web service website which requires payment for
services via Credit Card and Paypal. I've managed to get credit card
processing working via a Bluepay lib floating around, now i've been
having some trouble with paypal.

Basically what i'm trying to accomplish is: when the user submits an
order, their details are saved, then redirected to paypal to complete
payment, then after thats completed, they are redirected back to my site
from papal (and IPN will take care of saving the invoice status

It seems like a rather simple function, but all the paypal gems I've
seen (such as Tobias Lutke's paypal gem), have the form action to
directly send the user to paypal. When I require the form to submit to
to an action which saves their signup data first, then redirect them to

I've done tons of searching through google and these forums, but haven't
found a solution. Any suggestions would be much appreciated!

Db303dc84d03a992b33cd3ac978f89ae?d=identicon&s=25 Benjamin Curtis (Guest)
on 2007-02-16 05:16
(Received via mailing list)
It's fairly simple, even with using the paypal gem or
ActiveMerchant.  Have the form action submit to your controller to do
what it needs to do, then have the result of that action be a render
of the paypal form that submits directly to paypal.  Add a javascript
onload event to automatically submit the form, along with a "submit
to paypal" button for those who have javascript disabled, and you're
good to go.

Building an e-commerce site with Rails?

Meet up at RailsConf:
This topic is locked and can not be replied to.