A PayPal Buy Now button question

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
me!
Forum Contributor
Posts: 133
Joined: Sat Nov 04, 2006 8:45 pm

A PayPal Buy Now button question

Post by me! »

I have an order form that asks for user data,
then saves the data to the DB and generates a page to duble check the input and the PayPAl buy now button code.

That all works fine and the paypal button works also.
My problem is since the buy now button is a form that sends you to paypal the “submit” page on my site is still open when the buyer gets returned to the conformation page. :x
(So now there are two windows open for my site)

Any ideas on how to correct this? :?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

So submit the page to it's self or another page. Capture the data if needed and then redirect the user using header() to the paypal site.
me!
Forum Contributor
Posts: 133
Joined: Sat Nov 04, 2006 8:45 pm

Post by me! »

Ya but if I do a redirect than the form data will not be sent to paypal?
me!
Forum Contributor
Posts: 133
Joined: Sat Nov 04, 2006 8:45 pm

Post by me! »

I am trying to send POST data is there no good way?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Send a new post request with your data using cURL..

You may have to tweak a couple settings, depending on secure connections and whatnot. The manual and it's user comments covers pretty much everything you need to know. Give it a try, then post back if you need furthur assistance.
Post Reply