Write a simple SESSION / COOKIES code in PHP, for Paypal Payent

Cancelled Posted Jun 26, 2015 Paid on delivery
Cancelled Paid on delivery

I have integrated Paypal Payment into my website. I created and installed the "Paypal Payment Button" (the HTML code), and it works perfectly.

The problem, however, is that : after being re-directed to Paypal to make the payment, the user's session on my website is destroyed.

Meaning : after payment is successful (or canceled by the user, whichever).......the "Return URL" does not work, because the user has been LOGGED OUT of my website.

I am already using "SESSIONS" for every PHP file on my website.

But, SESSIONS are only for server-based variables. What I need are COOKIES.

I would like to have a simple "SET COOKIE FUNCTION" at the beginning of the "Paypal Payment" page on my website. So that : when the user has completed payment on Paypal's website, and he is returned to my website, his SESSION is still active/open.

I know how to set cookies, with the following syntax :

setcookie(name,value,expire,path,domain,secure,httponly);

But, all my attempts do not seem to work.

I do not need cookies for ALL my web-pages. I need them ONLY for the Payment Page, and the Return Page (after payment has been made on paypal)

I forgot to add the following :

as is my usual practice, I will NOT assign this project until you have produced an actual WORKING CODE !!!

I have explained this before, but I do not mind explaining again : each time, I assign this job, Freelancer.Com charges me money. And, I have dealt with far too many people who take on the project WITHOUT being able to actually get the job done !

And I have no option but to re-assign the project to someone else.

Hence : my policy of getting a valid and WORKING code first!..........before setting about assigning, and creating milestones, and whatnot.

I have added a document, which shows my current SESSION and COOKIE set-up

PayPal API PHP Software Architecture

Project ID: #7946300

About the project

16 proposals Remote project Active Jun 28, 2015

16 freelancers are bidding on average $42 for this job

kalidass678

Hi, i am interested on your project. i can start immediately your project. you can see my profile i have done lot of projects with client satisfaction. So, if you provide this project then i can satisfy you More

$35 USD in 1 day
(166 Reviews)
7.1
ZenithTechnoSol

hi, I have read your problem carefully and I am sure to assist you in fixing it. I agree with your policy of assigning project only if code provided to you works for you. Thanking You.. Anjum

$45 USD in 1 day
(70 Reviews)
7.0
techvolcano

Hi, Please provide access to your application. We are experts in php/payment gateway integration. Ready to start now. Thanks.

$40 USD in 1 day
(217 Reviews)
6.6
kevalthacker

Hello, How are you? I am able to do this work.I am ready to show you demo of it. Looking forward to talk with you. Thank you Regards, Keval thacker

$20 USD in 0 days
(83 Reviews)
6.3
Websitemaestro

Hello Sir, Actually we ready your all the description you want to solve payment get way session problem i will solve it and deliver successfully result. You check my portfolio you get idea what is capability. More

$25 USD in 1 day
(65 Reviews)
6.2
deven19

Hello, I am Devendra Chauhan specializing in software product development, and technology research and development (R&D) services, I have 4+ year of experience in Web Design and Development, I have 10 member team whic More

$54 USD in 2 days
(27 Reviews)
5.0
crea2boy

A proposal has not yet been provided

$30 USD in 1 day
(15 Reviews)
3.8
gmurgallis

I am a seasoned web developer with over 20 years experience. I understand your issue. You are correct the session is destroyed when your return from PayPal.

$10 USD in 1 day
(0 Reviews)
0.0
ibyvttnlnl

A proposal has not yet been provided

$30 USD in 2 days
(0 Reviews)
0.0
ianbuss

A proposal has not yet been provided

$55 USD in 1 day
(0 Reviews)
0.0
geone85

Hello, I'm a software engineer with more than 5 years working within a different variety of projects including paypal API integration, after going through your project requirements IS obvious that your solution will n More

$166 USD in 5 days
(0 Reviews)
0.0