[ back to toc ]

One form, several destinations?

Date: 2002/05/30 11:34

Q:
Hi Peter,

I'd like to set up a form for Paypal that simultaneously emails all its
data to me and submits the parts that Paypal want to them. (There are
several fields that I want and they don't.) Is there a script available
that can forward data to another script at the same time as emailing?

(I'm looking for a single script because I'd like to use the same form for
several payment options - sending cheque payment customers to one script,
Paypal ones to another, Worldpay ones to WP, etc)

Thanks for any help!

*NAME-DELETED*
A:
Dear *NAME-DELETED*,

I have never done something like that, but I have an idea that may work.
You can write a program that handles the form and mails it and answers a
form with all the data in it needed for PayPal in

<input type="hidden" ...

fields and some JavaScript (that I can not help with) that automatically
submits the second form to paypal.

It may happen that the second form is not submitted, while you get the
mail.

Another solution, which is more robust, but is much more difficult to
implement to get all the form data on your web server, send the mail and
send the data using HTTP protocol from your server to the PayPal server.
This way the client sends the data only to you and you send subset of the
information to PayPal.

To program this second solution you can use the module CURL. This is not
going to be simple.

Regards,
Peter

[ back to toc ]