cURL / Mailing Lists / curl-users / Single Mail

curl-users

Cookie problem with POST/HTTPS connection

From: Paul Forsyth <me_at_paulforsyth.com>
Date: Wed, 10 Mar 2004 13:09:45 +0000

Hi,

I'm trying to connect with Worldpay in order to start a transaction, by
POSTing information to through a https connection. I'm using PHP for
this but i think its a general issue so im posting here.

When i POST, Worldpay returns with an error page stating that I don't
have the right information. After a long period of examination, i've
concluded that cookies are the problem.

Normally, the browser posts form details to Worldpay and takes the user
to that page. When it does this it sets a session cookie. From my
experiences Worldpay use a different session cookie for every
transaction. Therefore I can't save the cookie information locally and
then reuse. Also, because curl makes a server connection, the session
isn't on their server, and therefore doesn't have the right session
cookie to start the process off. btw, no redirects are issued by
worldpay.

I believe they only way to make this work is to somehow redirect the
session to worldpay before POSTing, which is, i believe, the way the
browser works. From my understanding of curl i don't think it can do
this.

Has anyone experienced a problem like this? Am i going about things in
the wrong way? Any help would be appreciated.

Paul
Received on 2004-03-10