Cookies cleared upon posting to payment gateway

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Cookies cleared upon posting to payment gateway

Post by voltrader »

Cookies are set as:

setcookie("name", hash, 0, "/");

print_r of the cookies before posting to https://paymentgateway shows that they are all there

however, on return from https://paymentgateway, an immediate print_r of cookies show that they are all cleared!

I tried setting time to time()+3600, as I thought it may be a case of a pseudo-browser-close, but that didn't make any difference.

If I bypass paymentgateway, my cookies are all there, so I've narrowed down the problem to the posting and redirection to the payment gateway.

I've run out of things to try :(
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

ok, let me clarify:
  • Are you sending the user to https page of payment gateway from http page?
  • Does gateway redirect the user to http page?
  • Are domains of initial and final pages the same?
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

Thanks. I discovered that the return url did not have a www. and I missed passing back a critical variable.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

heh, most programming problems are simple in nature ;)
Post Reply