Page 1 of 1

Confirming Paypal Payment

Posted: Tue Jul 26, 2011 5:38 pm
by 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 ;)

Re: Confirming Paypal Payment

Posted: Wed Jul 27, 2011 1:28 am
by 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 :?

Re: Confirming Paypal Payment

Posted: Wed Aug 03, 2011 7:14 am
by 2cool4cereal2
Thanks for helping out. :D

I'll have to do some more research.