in reply to Coding and Design Advice

Its a bit subjective, but I prefer option 1 - asking for payment before giving the option to choose your 'product' seems a bit off putting to me. Alternatively, how about a first form with all the event information, on which they select their event, then clicking submit takes them to a second page for all three payment options. If they choose paypal it takes them to paypal from page 2, otherwise it sends the emails and says thanks?

And yes, I had a look at the URL you posted, and it does look like a rather unfriendly way to select payment at the moment.

g0n, backpropagated monk

Replies are listed 'Best First'.
Re^2: Coding and Design Advice
by Anonymous Monk on Mar 31, 2005 at 17:25 UTC
    Hello:

    Thank you for the reply. I like your alternative approach. I actually thought about this option as well. As I was thinking about it, I thought I might run into a bit of a problem with PayPal.

    On the first form, the user would fill out all the event information. They will click submit and takes them to a second form where they select the payment option.

    I set all the parameters for event charge to this button. When the user clicks the PayPal button, it will link them directly to PayPal and PayPal will take care of the rest.

    My question: In my script, if a person chooses the PayPal route, is it possible to include the PayPal button that I create (as mentioned above)? This button will have a direct link to PayPal. Will the script actually direct me to PayPal? I thought that I had to do the PayPal transaction outside the Perl script.

    Thank you for your time.
      I had in mind the following logic:

      1) user selects the event, enters their personal details etc, then clicks on submit

      2) 2nd form appears, with a radio button group for payment type. User selects their payment method and enters a membership number if appropriate, then clicks submit.

      3) Your script checks the value of the radio button group. If its paypal, it issues a http redirect to paypal, or displays a 'now being redirected to paypal' page then redirects to paypal, and sends the confirmation of booking emails. Otherwise, it sends the confirmation emails and displays a 'thank you' type page.

      You could also look at opening a new window to redirect to paypal, and displaying the 'thank you' in the main window, although these days a lot of browsers will refuse a popup.

      By 'do the paypal transaction outside the perl script' I take it you mean that you can't gather the users paypal account information in your own form and handle the paypal transaction yourself? I think you're right, the user has to interact with paypal themselves, although I don't know this for certain.

      Using this process, you only need a single submit button, rather than a submit for two of the payment types, and a separate paypal button (as long as there's nothing else forcing you to create a separate button).

      g0n, backpropagated monk
        Hi,

        I see what you're talking about. In your #3 step, how do I issue a http redirect to PayPal? I never did this before using a script so I'm not sure about the code. Otherwise, your idea would be perfect.

        Can you help me out with the redirect code?

        Thank you for your help and time.
        Hi,

        I see what you're talking about. In your #3 step, how do I issue a http redirect to PayPal? I never did this before using a script so I'm not sure about the code. Otherwise, your idea would be perfect.

        Can you help me out with the redirect code?

        Thank you for your help and time.
        Hi,

        I see where your going with this. I didn't think you could redirect within a script. I never did this before. In your step 3, how do I issue a http redirect to PayPal? What would the code look like?

        Thanks.