Re: sending a post request from a controller

2011-07-04 Thread David Susco
They're never providing login credentials, merely going to a payment
gateway that has received a post request. Essentially all I'm asking
is can a camping controller serve as a middle man for a post request
to another url?

Before I did form validation with JS client-side and then posted the
info to SM. Now, I'm asking can I post the info to a camping
controller, do the validation and then send the user off with another
post request. If not, then I'll have to see if I can do the
validation/prep with Ajax instead of a submit, then just post directly
to SM from the form.

Dave

On Mon, Jul 4, 2011 at 10:46 AM, John Beppu  wrote:
> I have a bad feeling about whatever you're trying to do.  However, I want to
> make sure that my interpretation of your intent is correct.
>
> It sounds like you want to create a web app that provides a form.
> When this form is submitted (and assuming the data is valid), you want to
> POST this data to a URL at https://www.salliemae.com/.
> Then, it sounds like you want to send a redirect so that the user of your
> webapp ends up at an appropriate page at https://www.salliemae.com/
> (possibly with a prefilled form courtesy of your work).
>
> If this is the case, you have a big problem -- salliemae.com login info is
> needed in too many places.
> Step 2 (which happens on the server side) needs the user's Sallie Mae login
> credentials in order to perform a successful POST, and that's unwise to give
> out.  Your users should never have to trust you with their Sallie Mae
> username and password.  That should be private information, never to be
> given out to 3rd parties (including you).
> Step 3 also requires that the user's browser already be logged in to
> salliemae.com or the redirect wouldn't work.
>
> I have the feeling that you're trying to simplify a person's user experience
> by prefilling a cumbersome form, but your strategy for doing this may be
> flawed.
> --beppu
> On Sun, Jul 3, 2011 at 8:06 PM, David Susco  wrote:
>>
>> They do not, pretty much they need a few input tags and that's about
>> it. I'm just looking to do my form validation/preparation server-side
>> instead of client-side.
>>
>> Dave
>>
>> On Sun, Jul 3, 2011 at 9:35 PM, John Beppu  wrote:
>> > Does Sallie Mae provide a payment processing API?  I searched for it,
>> > but I
>> > couldn't find anything.
>> >
>> > On Sun, Jul 3, 2011 at 4:46 AM, David Susco  wrote:
>> >>
>> >> None of those, I'm in education, and we have to go through Sallie Mae.
>> >>
>> >> Dave
>> >>
>> >> On Sun, Jul 3, 2011 at 1:16 AM, John Beppu 
>> >> wrote:
>> >> > Can you tell us what payment processing system you're trying to work
>> >> > with?
>> >> > Is it PayPal or Google Checkout?
>> >> > Bitcoin?  ;-)
>> >> >
>> >> > On Thu, Jun 30, 2011 at 6:48 AM, David Susco 
>> >> > wrote:
>> >> >>
>> >> >> Ideally I'd like a user to be able to submit a form to the camping
>> >> >> app, having camping do all the validation and some preprocessing and
>> >> >> then have the camping app send the user to an external site (with
>> >> >> the
>> >> >> post data) where the user can complete a payment.
>> >> >>
>> >> >> Dave
>> >> >>
>> >> >> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik
>> >> >> 
>> >> >> wrote:
>> >> >> > No, redirects are an HTTP response, they're not a new request.
>> >> >> > Can you give a more concrete example? Your explanation sounds like
>> >> >> > you're
>> >> >> > trying to do two different things, and I'm not sure which you
>> >> >> > mean.
>> >> >> > ___
>> >> >> > Camping-list mailing list
>> >> >> > Camping-list@rubyforge.org
>> >> >> > http://rubyforge.org/mailman/listinfo/camping-list
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Dave
>> >> >> ___
>> >> >> Camping-list mailing list
>> >> >> Camping-list@rubyforge.org
>> >> >> http://rubyforge.org/mailman/listinfo/camping-list
>> >> >
>> >> >
>> >> > ___
>> >> > Camping-list mailing list
>> >> > Camping-list@rubyforge.org
>> >> > http://rubyforge.org/mailman/listinfo/camping-list
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dave
>> >> ___
>> >> Camping-list mailing list
>> >> Camping-list@rubyforge.org
>> >> http://rubyforge.org/mailman/listinfo/camping-list
>> >
>> >
>> > ___
>> > Camping-list mailing list
>> > Camping-list@rubyforge.org
>> > http://rubyforge.org/mailman/listinfo/camping-list
>> >
>>
>>
>>
>> --
>> Dave
>> ___
>> Camping-list mailing list
>> Camping-list@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@

Re: sending a post request from a controller

2011-07-04 Thread John Beppu
I have a bad feeling about whatever you're trying to do.  However, I want to
make sure that my interpretation of your intent is correct.


   1. It sounds like you want to create a web app that provides a form.
   2. When this form is submitted (and assuming the data is valid), you want
   to POST this data to a URL at https://www.salliemae.com/.
   3. Then, it sounds like you want to send a redirect so that the user of
   your webapp ends up at an appropriate page at
https://www.salliemae.com/(possibly with a prefilled form courtesy of
your work).


If this is the case, you have a big problem -- salliemae.com login info is
needed in too many places.

Step 2 (which happens on the server side) needs the user's Sallie Mae login
credentials in order to perform a successful POST, and that's unwise to give
out.  Your users should never have to trust you with their Sallie Mae
username and password.  That should be private information, never to be
given out to 3rd parties (including you).

Step 3 also requires that the user's browser already be logged in to
salliemae.com or the redirect wouldn't work.

I have the feeling that you're trying to simplify a person's user experience
by prefilling a cumbersome form, but your strategy for doing this may be
flawed.

--beppu

On Sun, Jul 3, 2011 at 8:06 PM, David Susco  wrote:

> They do not, pretty much they need a few input tags and that's about
> it. I'm just looking to do my form validation/preparation server-side
> instead of client-side.
>
> Dave
>
> On Sun, Jul 3, 2011 at 9:35 PM, John Beppu  wrote:
> > Does Sallie Mae provide a payment processing API?  I searched for it, but
> I
> > couldn't find anything.
> >
> > On Sun, Jul 3, 2011 at 4:46 AM, David Susco  wrote:
> >>
> >> None of those, I'm in education, and we have to go through Sallie Mae.
> >>
> >> Dave
> >>
> >> On Sun, Jul 3, 2011 at 1:16 AM, John Beppu 
> wrote:
> >> > Can you tell us what payment processing system you're trying to work
> >> > with?
> >> > Is it PayPal or Google Checkout?
> >> > Bitcoin?  ;-)
> >> >
> >> > On Thu, Jun 30, 2011 at 6:48 AM, David Susco 
> wrote:
> >> >>
> >> >> Ideally I'd like a user to be able to submit a form to the camping
> >> >> app, having camping do all the validation and some preprocessing and
> >> >> then have the camping app send the user to an external site (with the
> >> >> post data) where the user can complete a payment.
> >> >>
> >> >> Dave
> >> >>
> >> >> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik <
> st...@steveklabnik.com>
> >> >> wrote:
> >> >> > No, redirects are an HTTP response, they're not a new request.
> >> >> > Can you give a more concrete example? Your explanation sounds like
> >> >> > you're
> >> >> > trying to do two different things, and I'm not sure which you mean.
> >> >> > ___
> >> >> > Camping-list mailing list
> >> >> > Camping-list@rubyforge.org
> >> >> > http://rubyforge.org/mailman/listinfo/camping-list
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Dave
> >> >> ___
> >> >> Camping-list mailing list
> >> >> Camping-list@rubyforge.org
> >> >> http://rubyforge.org/mailman/listinfo/camping-list
> >> >
> >> >
> >> > ___
> >> > Camping-list mailing list
> >> > Camping-list@rubyforge.org
> >> > http://rubyforge.org/mailman/listinfo/camping-list
> >> >
> >>
> >>
> >>
> >> --
> >> Dave
> >> ___
> >> Camping-list mailing list
> >> Camping-list@rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/camping-list
> >
> >
> > ___
> > Camping-list mailing list
> > Camping-list@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/camping-list
> >
>
>
>
> --
> Dave
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending a post request from a controller

2011-07-03 Thread David Susco
They do not, pretty much they need a few input tags and that's about
it. I'm just looking to do my form validation/preparation server-side
instead of client-side.

Dave

On Sun, Jul 3, 2011 at 9:35 PM, John Beppu  wrote:
> Does Sallie Mae provide a payment processing API?  I searched for it, but I
> couldn't find anything.
>
> On Sun, Jul 3, 2011 at 4:46 AM, David Susco  wrote:
>>
>> None of those, I'm in education, and we have to go through Sallie Mae.
>>
>> Dave
>>
>> On Sun, Jul 3, 2011 at 1:16 AM, John Beppu  wrote:
>> > Can you tell us what payment processing system you're trying to work
>> > with?
>> > Is it PayPal or Google Checkout?
>> > Bitcoin?  ;-)
>> >
>> > On Thu, Jun 30, 2011 at 6:48 AM, David Susco  wrote:
>> >>
>> >> Ideally I'd like a user to be able to submit a form to the camping
>> >> app, having camping do all the validation and some preprocessing and
>> >> then have the camping app send the user to an external site (with the
>> >> post data) where the user can complete a payment.
>> >>
>> >> Dave
>> >>
>> >> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik 
>> >> wrote:
>> >> > No, redirects are an HTTP response, they're not a new request.
>> >> > Can you give a more concrete example? Your explanation sounds like
>> >> > you're
>> >> > trying to do two different things, and I'm not sure which you mean.
>> >> > ___
>> >> > Camping-list mailing list
>> >> > Camping-list@rubyforge.org
>> >> > http://rubyforge.org/mailman/listinfo/camping-list
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dave
>> >> ___
>> >> Camping-list mailing list
>> >> Camping-list@rubyforge.org
>> >> http://rubyforge.org/mailman/listinfo/camping-list
>> >
>> >
>> > ___
>> > Camping-list mailing list
>> > Camping-list@rubyforge.org
>> > http://rubyforge.org/mailman/listinfo/camping-list
>> >
>>
>>
>>
>> --
>> Dave
>> ___
>> Camping-list mailing list
>> Camping-list@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: sending a post request from a controller

2011-07-03 Thread John Beppu
Does Sallie Mae provide a payment processing API?  I searched for it, but I
couldn't find anything.

On Sun, Jul 3, 2011 at 4:46 AM, David Susco  wrote:

> None of those, I'm in education, and we have to go through Sallie Mae.
>
> Dave
>
> On Sun, Jul 3, 2011 at 1:16 AM, John Beppu  wrote:
> > Can you tell us what payment processing system you're trying to work
> with?
> > Is it PayPal or Google Checkout?
> > Bitcoin?  ;-)
> >
> > On Thu, Jun 30, 2011 at 6:48 AM, David Susco  wrote:
> >>
> >> Ideally I'd like a user to be able to submit a form to the camping
> >> app, having camping do all the validation and some preprocessing and
> >> then have the camping app send the user to an external site (with the
> >> post data) where the user can complete a payment.
> >>
> >> Dave
> >>
> >> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik 
> >> wrote:
> >> > No, redirects are an HTTP response, they're not a new request.
> >> > Can you give a more concrete example? Your explanation sounds like
> >> > you're
> >> > trying to do two different things, and I'm not sure which you mean.
> >> > ___
> >> > Camping-list mailing list
> >> > Camping-list@rubyforge.org
> >> > http://rubyforge.org/mailman/listinfo/camping-list
> >> >
> >>
> >>
> >>
> >> --
> >> Dave
> >> ___
> >> Camping-list mailing list
> >> Camping-list@rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/camping-list
> >
> >
> > ___
> > Camping-list mailing list
> > Camping-list@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/camping-list
> >
>
>
>
> --
> Dave
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending a post request from a controller

2011-07-03 Thread David Susco
None of those, I'm in education, and we have to go through Sallie Mae.

Dave

On Sun, Jul 3, 2011 at 1:16 AM, John Beppu  wrote:
> Can you tell us what payment processing system you're trying to work with?
> Is it PayPal or Google Checkout?
> Bitcoin?  ;-)
>
> On Thu, Jun 30, 2011 at 6:48 AM, David Susco  wrote:
>>
>> Ideally I'd like a user to be able to submit a form to the camping
>> app, having camping do all the validation and some preprocessing and
>> then have the camping app send the user to an external site (with the
>> post data) where the user can complete a payment.
>>
>> Dave
>>
>> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik 
>> wrote:
>> > No, redirects are an HTTP response, they're not a new request.
>> > Can you give a more concrete example? Your explanation sounds like
>> > you're
>> > trying to do two different things, and I'm not sure which you mean.
>> > ___
>> > Camping-list mailing list
>> > Camping-list@rubyforge.org
>> > http://rubyforge.org/mailman/listinfo/camping-list
>> >
>>
>>
>>
>> --
>> Dave
>> ___
>> Camping-list mailing list
>> Camping-list@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: sending a post request from a controller

2011-07-02 Thread John Beppu
Can you tell us what payment processing system you're trying to work with?

Is it PayPal or Google Checkout?

Bitcoin?  ;-)

On Thu, Jun 30, 2011 at 6:48 AM, David Susco  wrote:

> Ideally I'd like a user to be able to submit a form to the camping
> app, having camping do all the validation and some preprocessing and
> then have the camping app send the user to an external site (with the
> post data) where the user can complete a payment.
>
> Dave
>
> On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik 
> wrote:
> > No, redirects are an HTTP response, they're not a new request.
> > Can you give a more concrete example? Your explanation sounds like you're
> > trying to do two different things, and I'm not sure which you mean.
> > ___
> > Camping-list mailing list
> > Camping-list@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/camping-list
> >
>
>
>
> --
> Dave
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending a post request from a controller

2011-06-30 Thread David Susco
Ideally I'd like a user to be able to submit a form to the camping
app, having camping do all the validation and some preprocessing and
then have the camping app send the user to an external site (with the
post data) where the user can complete a payment.

Dave

On Wed, Jun 29, 2011 at 5:00 PM, Steve Klabnik  wrote:
> No, redirects are an HTTP response, they're not a new request.
> Can you give a more concrete example? Your explanation sounds like you're
> trying to do two different things, and I'm not sure which you mean.
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: sending a post request from a controller

2011-06-29 Thread Steve Klabnik
No, redirects are an HTTP response, they're not a new request.

Can you give a more concrete example? Your explanation sounds like you're
trying to do two different things, and I'm not sure which you mean.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: sending a post request from a controller

2011-06-29 Thread David Susco
Can I send POST data along with a redirect?

Dave

On Wed, Jun 29, 2011 at 3:44 PM, Steve Klabnik  wrote:
> If you're sending them along, isn't that a redirect, not a POST?
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: sending a post request from a controller

2011-06-29 Thread Steve Klabnik
If you're sending them along, isn't that a redirect, not a POST?
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

sending a post request from a controller

2011-06-29 Thread David Susco
What's the cleanest way to do this? With Net::HTTP? I have a form
that's sent to a controller and validated. If its valid I'd like to
send the user on (along with the info they've entered) to an external
site to process payment.

Thanks,
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list