HI!
I'm trying to modify paypal method. I want to change the actual method and put a subscription method.
So in the file paypal.php, I modifies "cmd" and put "cmd=_xclick-subscriptions". I put others paypal variables in link with the subscription. It's work fine. But the problem is when I want to get back datas from paypal and to put them in the database. I used the pdt variable "tx" and the method "_notify-synch" to get back datas. when the cutomer finish to pay, datas are send from paypal and I put them into my database, but the data are not inserted in database only if I refresh the page of my website. I tried a lot of solutions to refresh the page: for example, in the function "_getPaymentResponseHtml" I added a header like that:
$redirect=clone(JURI::getInstance());
$redirect=clone(JURI::getInstance());
if(!isset($_COOKIE["refresh"]))
// si le cookies refresh n'existe pas
setcookie("refresh", "1", time()+7200); //on créé le cookie avec une durée de 2h
header("Location:".rawurldecode($redirect));
but the page is not charged. I have a message from firefox telling that the page is not correctly redirected and it's maybe because of cookies; Please if you have an idee help me!
thank you!
ps: my english is not very good :-[