Confirming Paypal Payment

3 posts Page 1 of 1
Contributors
User avatar
2cool4cereal2
VIP - Donator
VIP - Donator
Posts: 151
Joined: Thu Oct 14, 2010 3:26 am

Confirming Paypal Payment
2cool4cereal2
Okay, despite being here at C'N'S, I'm still never quite sure where to put my topics, but I figured that HTML is more or less what I am looking for... So:

I want to have a link on my website that when click, sends the user to paypal where they can buy a serial code for my software. (That part is easy, paypal more or less does it for you.)
-
After they complete the purchase, a serial code will be emailed to them and they will be brought to the download section of my website.

I am unsure on how to get this email to be sent and make it include a serial number.
Where would the serial number have to be stored? Some sort of database or something?
And how do I make it not send the same serial twice? Because each of my serials only work once on each program.

Thank you for anyone who can provide any information.

Sincerely,
2cool4cereal2 ;)
"I try to be modest at all times, and that's what makes me better than everyone else."
Image
Image
Image
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4390
Joined: Tue Aug 04, 2009 1:47 am

Re: Confirming Paypal Payment
CodenStuff
Hello,

Ok so you have your html link to paypal which takes you to paypal to make payment then brings you back something like this:
https://www.paypal.com/us/cgi-bin/websc ... &no_note=1
That link contains your paypal email, name of product, item number, cost, currency, notify url and return url.

So youve got that but what you need is a PHP script for paypal to talk too after payment. Check this page out: https://cms.paypal.com/us/cgi-bin/?cmd= ... ementation

That contains an example of the IPN script (notify_url) you will need in order to do what you want.

For product keys you will need to store these in a database and to use them and send them in an email you will need to add some mysql fetch code into the IPN script..it all depends on how your software reads the keys and how you want it all setting up etc :?
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
2cool4cereal2
VIP - Donator
VIP - Donator
Posts: 151
Joined: Thu Oct 14, 2010 3:26 am

Re: Confirming Paypal Payment
2cool4cereal2
Thanks for helping out. :D

I'll have to do some more research.
"I try to be modest at all times, and that's what makes me better than everyone else."
Image
Image
Image
3 posts Page 1 of 1
Return to “Tutorials”