YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

How do I get PP to send me back a purchase invoice number for a successfully completed transaction? Options
mcange77
#1 Posted : Sunday, May 15, 2011 6:01:06 PM
Rank: Starting Member

Groups: Registered

Joined: 5/15/2011
Posts: 1
Hello all,

I need some help.
I am a student PHP developer, trying to help my sister with her website, but am a little out of my depth.

My sister is a community fitness instructor running her own self-employed classes.
She wants people to 'bulk buy' her classes (and get a discount) via her website.

I have successfully created a buy now button, added it to her website, and can redirect the buyer back to a success page on her website.

However, she wants to populate this success page, with the order info, to do so, I need to pull the data back out of the database and need the purchase order number to identify the record. I therefore need Paypal to give the success page the purchase order number.

The way that I think to do this is to somehow, send a purchase order number that my database creates to paypal when the buyer clicks on the button. Paypal then processes the payment, upon successful completion, the buyer gets redirected back to the website, sending with it the purchase order number.
I can take it from there.

Q1) Is this the best way to handle this situation?
Q2) Using PHP how do I send a purchase invoice number to paypal?
Q3) How do I get Paypal to send the invoice number back?

What I am asking for is example code. I HAVE NO IDEA HOW TO DO THIS IN CODE.

Thanks
x



Sponsor  
 
scoutt
#2 Posted : Friday, May 20, 2011 10:41:49 AM
Rank: Junior Member

Groups: Registered

Joined: 11/6/2002
Posts: 139
Location: ,
You would have to use the _cart purchase of paypal, not buy now. Once you do that paypal will send whatever you sent them back to your IPN script. and then you can have paypal send the user back to a thankyou script which will POST whatever you sent the first time, so all that info is there. You would just have to verify it with what your IPN script put in the database to make sure it is the same verified purchase. By default you send an invoice number that you generate on your site before sending it to paypal. The _cart purchase will allow them to buy as many classes as you offer. There are a lot of examples of how this is setup on paypal.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.205 seconds.