Page 1 of 1

CURL Post Along with redirect

Posted: Thu Aug 05, 2004 9:41 am
by rossriley
Hello people,
I'm trying to connect with a payment processing interface.
The process is as follows.....
The user enters their personal information, accepts terms and conditions etc and then clicks on proceed to payment.
What i need to do is send a form to the payment processor that contains all the order information and also a hash of the order which they check for security.
So after the user presses the form submit i need to take the form variables and add my own before posting on to the payment interface.

Now I can do this with CURL and send the POST variables no problem, the only hitch is that the user stays on my page and doesn't get forwarded to the Payment processors site.

How do i go about doing this as if the user had submitted the form directly and they get directed to the other site without knowing what variables i have added?

Thanks for any input
Ross

Posted: Thu Aug 05, 2004 10:33 am
by Weirdan
Well, what says support team of your processor on this matter? I doubt we can help you without their specifications at hand...

Posted: Thu Aug 05, 2004 10:47 am
by rossriley
It's not an issue for them, all they need is a single post to their url where the user goes on to enter their card details.
The post data has to be sent along with the user, and i will get sent a return post containing an authorisation code.

What my problem is is how to POST all my info to their url as obviously i can't sent things like the transaction amount and currency in hidden form fields.

Now i can do this using CURL, i've sent the data to one of my own pages which stores the POST variables in my database. So i know that works ok, all i need to be able to do is send the user to the url along with the data.

Any ideas?

Ross

Posted: Thu Aug 05, 2004 10:50 am
by feyd
run a post through curl, output a header and html that redirects the user..

Posted: Thu Aug 05, 2004 11:57 am
by Weirdan
feyd wrote:output a header and html that redirects the user..
redirect where, huh? ;)

Perhaps you need to present the user with a form containing all the data in hidden fields with single submit button. In action form attribute specify the url of your processor's payment form...

Posted: Thu Aug 05, 2004 12:21 pm
by rossriley
yes but the problem with this is that the transaction amount is in a hidden field, surely there's a more secure way of doing this?

Posted: Thu Aug 05, 2004 12:23 pm
by feyd
Weirdan wrote:redirect where, huh? ;)
hmm.. to the payment processor's form, maybe? :P

Posted: Thu Aug 05, 2004 12:43 pm
by Weirdan
feyd wrote:
Weirdan wrote:redirect where, huh? ;)
hmm.. to the payment processor's form, maybe? :P
Without any data? I can't believe it.
rossriley wrote: yes but the problem with this is that the transaction amount is in a hidden field, surely there's a more secure way of doing this?
doesn't your processor require a hash signature or something?