Im trying to integrate a bank api for redirect payment. Im using curl post method but i want to be able to follow the redirect after the post. Here is my code
curl_setopt($ch, CURLOPT_URL, 'https://paycenter.piraeusbank.gr/redirection/pay.aspx');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'data' => $data
));
$content = curl_exec($ch);
After the post it supposed that i have to be redirected in a url like
https://paycenter.piraeusbank.gr/redirection/4234sgsfdgfsg/pay.aspx
Instead of that im redirecting to:
http://mytestdomain.org/redirection/4234sgsfdgfsg/pay.aspx
which obviously ends up in 404 error