|
Posted by NC on 04/11/06 17:24
Angelos wrote:
>
> I used curl like in the example bellow:
> $urlString = "cartId=56997&name=fred";
> $ch = curl_init("https://select.worldpay.com/wcc/purchase");
> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $urlString);
> curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> echo $data = curl_exec($ch);
> curl_close($ch);
>
> but thats not working as I expect it to work.
> I would excpect to redirect to https://select.worldpay.com/wcc/purchase
> and post the values in the $urlString.
>
> My code sort of does that but it includes the worldpay page in my website.
Yes, because you are telling it to do it. Get rid of echo, and it
won't...
Cheers,
NC
[Back to original message]
|