in reply to Re: Redirect with Perl - POST method
in thread Redirect with Perl - POST method

I have to have it first post to my script, so I can apply their discounts to our software. If they have any or not, we do a few things, if they want a subscription then we give them a discount based on how much time they purchasing for our predictive dialer. If they don't then we don't create a subscription and I encrypt the paypal string using their system configuration and openssl. For that to work, it has to be a POST, I have tried to just redirect them there with encrypt= and the whole string, but because there are multiple lines, it does not work. I guess that is the reason.

At any rate, I put a temporary solution on there, just letting them know, since they chose PayPal, and not a credit card, that they must first activate the software by clicking the activate button, which I just have post the form. I don't like it, since it seems redundant to me, nonetheless, it works, so I guess if Perl cannot POST to a url on a redirect, that will have to do.

Thank you, both, very much!
thx,
Richard

Replies are listed 'Best First'.
Re^3: Redirect with Perl - POST method
by derby (Abbot) on Jun 29, 2006 at 13:49 UTC

    It's not that Perl cannot POST a redirect ... no one can post a REDIRECT ... it's not part of the spec to begin with and more importantly, your looking at your HTTP verbs backwards ... GET, POST, PUT, DELETE are all things a client can ask of a server ... REDIRECTs are what servers ask of clients.

    I don't think you've adequately outlined what you're trying to accomplish, so let me assume.

    1. You have a form that acts like a shopping cart
    2. users post to your form
    3. You do something with the form data
    4. You then pass the data onto ???
    5. ??? completes the transaction ???

    it's steps 4 and 5 you're hazy on. Do they need to happen that way. Can you use LWP inside your script to post data to the other server and then parse the response? From that point of view, the transaction is transparent to the user (much in the same way CreditCard transactions are transparent - we as endusers, never see the payment gateway nor the merchant bank).

    -derby