Simple IPN: Free Paypal IPN PHP Script for Digital Download Products


UPDATED: 20 June 2014

Simple IPN is now open sourced and can be downloaded from Github. Or you can use the link below.

[ Download ZIP ]

[ Project Repository at Github ]




I was running a class for my Netpreneurs Online Classroom and we got to the part where we are suppose to learn how to deliver our downloadble digital products.

I don’t want to make this complicated for my students. I want to make this simple, but at the same time offers some form security from online thefts. So I started thinking of a simple script that should be able to do the following:

  • Expiring download link
  • Expiring download page
  • Minimum setup
  • No database required
  • Uses Paypal IPN
  • Emails the customers with their download info
  • Customizable download page, thank you page and email
  • Multiple files product package
  • Allows Paypal Sandbox testing
  • No need to create the Paypal Button form – will generate for you
  • Don’t have to understand Paypal IPN – just know that it’s more secure
  • Strict verification process – verifying price, Paypal email address and currency


  1. Update settings.php with your products info and Paypal details.
  2. Upload the files your chosen directory
  3. From your sales page, link your order button to:



  4. Optionally, modify the template files to change the look and feel of the download page and thank you page.
  5. Optionally, send me $10 to remove the little ads credit on the download page and thank you page. Details below.


  • ipn.php – handles IPN and buy button creation
  • settings.php – your product & Paypal settings
  • dl.php – handles file download
  • page.php – handles download and thank you page
  • tpl_tqpage.html – thank you page template
  • tpl_dlpage.html – download page template
  • functions.php – functions required
  • style.css – optional stylesheet
  • sample.pdf – sample download file
  • sample.mp3 – sample download file
  • XXXXXXXXXXXXXXXXX.php – generate customer info file


Most of the variables in settings.php are self-explanatory.


You can customize the look and feel of the script. To change the download page, edit tpl_dlpage.html.

The following variables are available for the DOWNLOAD PAGE:

  • {PAYPAL TXN ID} – transaction ID
  • {CUSTOMER NAME} – customer name
  • {CUSTOMER BUSINESS NAME} – business name, if any
  • {CUSTOMER PAYPAL EMAIL} – customer’s Paypal email
  • {PAYPAL PURCHASE DATE} – purchase date
  • {EXPIRE DATE} – expired date (in unix timestamp)
  • {DOWNLOAD PAGE URL} – download page URL
  • {DOWNLOAD TIME LEFT} – time left in hours
  • {DOWNLOAD TIME} – time set in hours
  • {PRODUCT PRICE} – price paid
  • {PRODUCT NAME} – product name
  • {SUPPORT EMAIL ADDRESS} – your support email address
  • {DOWNLOADS1} – lists downloadable files style 1
  • {DOWNLOADS2} – lists downloadable files style 2
  • {DOWNLOADS1|expire message} – optional expire message
  • {DOWNLOADS2|expire message} – optional expire message

The thank you page is the page the customer will arrive at when the click on Return To Merchant at You can setup a squeeze page there, using the following variables in redirect URL or custom fields.

To edit the THANK YOU page, edit tpl_tqpage.html. The following variables are available for you in the thank you page template:

  • {PAYPAL TXN ID} – transaction ID
  • {CUSTOMER NAME} – customer name
  • {CUSTOMER BUSINESS NAME} – business name, if any
  • {CUSTOMER PAYPAL EMAIL} – customer’s Paypal email
  • {PAYPAL PURCHASE DATE} – purchase date
  • {PRODUCT PRICE} – price paid
  • {PRODUCT NAME} – product name
  • {SUPPORT EMAIL ADDRESS} – your support email address
  • {DOWNLOAD PAGE URL} – download page URL

An email will be sent out to customers after the purchase. You can customize this email from settings.php.


To list out downloadable files, you can use the following template variables.

  • {DOWNLOADS1} – lists downloadable files style 1
  • {DOWNLOADS2} – lists downloadable files style 2
  • {DOWNLOADS1|expire message} – optional expire message
  • {DOWNLOADS2|expire message} – optional expire message

{DOWNLOADS1} will output the files in this manner:

<ul id='dlist'>
<li>Sample Audio MP3 <small>[ <a href='dl.php?id=6V001313X66714025&file=0'>DOWNLOAD</a> ]</small></li>
<li>Sample PDF eBook <small>[ <a href='dl.php?id=6V001313X66714025&file=1'>DOWNLOAD</a> ]</small></li>

{DOWNLOADS2} will output the files in this manner

<ul id='dlist'>
<li><a href='dl.php?id=6V001313X66714025&file=0'>Sample Audio MP3</a></li>
<li><a href='dl.php?id=6V001313X66714025&file=1'>Sample PDF eBook</a></li>

When the download link has expired, the expired message will be put out in a <p> tag, with ID "expired". Here’s an example:

<p id='expired'>Your download has expired</p>

You can use the ID’s “dlist” and “expired” to style your download page with CSS.


While Simple IPN can work with multiple files in your product package, Simple IPN is not designed to cater for multiple products.

To use Simple IPN on your other products, copy the files of Simple IPN into a new folder and define your settings in the settings.php file.

Just like how you previously link to ipn.php?buy, do the same for this new product. Make sure you link to the right file from the right folder.


I don’t plan to spend a lot of time on support for this little script, unless you are paid user. And that also does not include customization, add-ons, feature requests, etc.

If you need help with Simple IPN, my advice to you is to first go through this page again. And from time to time, I may add updates to this page. Secondly, you may want to read the comments below.

You can also write your own comments there.

And lasty, if you don’t mind, show me where you are using this script.


18 September 2009 – Found that most of the problems users are facing when Transaction File is not created, is because they are using PHP4 while SimpleIPN was coded for PHP5. I changed the codes to be working with PHP4 instead now. You can download the new compilation and give a try.

Another problem with emails not being sent, it could be because the web hosting has some rules about sending email where the From email is not hosted by the server. To be safe, only use email address that is managed by the server for $support_email_address.

8 March 2010 – I found that the Thank You Page would now work if you have Auto Return turned on in your Paypal Profile. You need to turn it off, or have it disabled. Read more about Auto Return





667 Responses to “Simple IPN: Free Paypal IPN PHP Script for Digital Download Products”

  1. The Easy Way To Protect Your Digital Download With Paypal IPN -- said:

    [...] – August 18, 2009: I just created Simple IPN, a free Paypal-IPN PHP script. Click here to read more about it. [...]

  2. Glen said:


    The script is a great idea, but can be a pain for the average person to edit the various elements of the script, since many people are not savvy in that area.

    IMO, I think you bundle the script with a GUI that the user can work through easily to modify the various element.

    It’s like putting together a price of software.

    Then I think you could ‘sell it’ for a good price, because there would be good value in that

  3. Garret said:

    I agree with Glen. I’ve got years of building commercial and non -commercial scripts. The gui would make all the dif in the world.

  4. admin said:

    Geln, Garret … the settings.php is quite simple actually. Give it a try and then send me another comment, OK. With Simple IPN, you don’t need to bother with database setup, no messy Paypal Button form creation, etc… just that little settings.php.

    Of course, I still agree with Garret, a GUI would make a difference in the world.

    Maybe a newer update/version.

  5. Free Paypal IPN script for digital products - for everyone! - WarriorForum - Internet Marketing Forums said:

    [...] script, writing docs, etc… and now you can get it for free. Just download it from my website: Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — Feedbacks, comments, help… we can discuss it here or you can add comments to my [...]

  6. Steve said:

    Hey, thanks for sharing this cool script with us :)

    I am going to use this to sell my ebook!

  7. Alan said:

    Okay Glen and Garret you better move on over because this FREE Simple Pin does wonders for a lot of us that are still behind you on the upward path to becoming like you!

    Well perhaps it doesn’t go that far but I do know that it is going to be an enormous help for at least this one person.

    many thanks for supplying it in the first place and for keeping the cost at a place where it doesn’t prevent us from gaining the benefit in the first place.

    I will send you the link to my first product so that you can test out the customization I have to do.

  8. Kidino said:

    Thanks for the glowing support Alan. And Glen and Garret, don’t be taken back by Alan or anything. I know you are just giving good recommendations and I value it.

  9. Simple IPN: Free Paypal IPN PHP Script for Digital Download … « AdsBidWorld said:

    [...] Here is the original:  Simple IPN: Free Paypal IPN PHP Script for Digital Download … [...]

  10. Blog Perniagaan Internet said:

    Hello.. thank God coz you share this great script with us. Thanks again.. ;-D

  11. Simple IPN: Free Paypal IPN PHP Script for Digital Download … | Top Digital Products UK said:

    [...] Go here to read the rest: Simple IPN: Free Paypal IPN PHP Script for Digital Download … [...]

  12. Sahed said:

    I’m use paypal ipn script on my website The product automatc send to customer email with expr time. The script can use multpl prodct.

  13. Kidino said:

    OK guys, I hope this commenting will not start any script is better than this script. I know the shortcomings of this script and it is for a reason. If you want a full-blown system, then get DLGuard (which I also use).

    Simple IPN is meant to be simple, easy to use and FREE.

    If you want that, take it….

  14. mike beckloff said:

    I am making this comment to further notify you that I do not wish to receive your emails, cancel any membership and do not charge me any fees . Thanks Mike Beckloff

  15. ASU Service said:

    Thank you for the script! I haven’t installed it yet but it appears to be much more powerful than similar scripts costing $25 or more.

  16. Kidino said:

    Alright! A real testimonial. Cool. Mind sharing a sample download page? ;) You know that you can style your download page ANY WAY YOU WANT, right? And with CSS, it doesn’t even have to look like what I compiled for you.

  17. Steve Diamond said:

    Hi. Great giveaway! Thanks a lot!

    When you say that after paying the $10 fee “You may use the script in any way you want,” does that include rewriting it, rebranding it, and selling it?

  18. Kidino said:

    Hello Steve. Thanks for asking. Maybe I should be a lot clearer on that. I don’t mind if you get the $10 version and use it on as many sites you want, on as many clients’ sites you want, modify it your way, in any way…

    But when it’s rewriting, rebranding and reselling…

    Hmm… so what’s the answer for this?

    The lazy part of me says, “the heck, just don’t care”

    The greedy part of me says, “hey, you are entitled to some compensation”

    What do you think??

  19. Muaz said:

    Assalamualaikum mr kidino ,

    I have installed the script and test it live but its seem not working very well , script send email of download detail but when i clicked the download link it show ” Purchase Details Not Found. Contact Administrator. “

  20. Kidino said:

    @Muaz – It could be that the IPN failed to create the customer details. In most cases, when you upload the script to the server, the script already has write permission to the folder. Try chmod 777 the folder where you uploaded the script.

    Since this is new, I’d be happy to troubleshoot this for you. I could add this to the docs too. Check your email about details on how to contact me… I sent you one.

  21. Buy Master Resell Right products at very low price said:

    Thank you. Visit our site Http://

  22. Steve Diamond said:

    Kidino, here’s what I think about reselling it. If I do get to that point I’ll set you up as an affiliate with a JV-level commission. I’m not contemplating a high price tag, so don’t get too excited about the possibilities. But I certainly think you deserve a cut.

  23. Didier said:

    Thank you Kidino.

    I purchased the source code version to support your efforts.


  24. Kidino said:

    @Didier – Thanks!

    @Steve Diamond – Thanks too! I understand.

  25. pjCheviot said:

    Hi Kidino

    I have purchased the unbranded script – what a great piece of code!

    I think it may be an idea to leave the “branded” code facility in there – so that people could add their own pop-up message – rather than deleting it? Just a thought!

    Thanks again for the source code! Great Stuff!!


  26. TX CHL Instructor said:

    I initially had problems with the paid product download. It said there was no record of the transaction. Turned out I was just too impatient; I went back a few minutes later to try again (wanted to document the exact error message) and it worked. Got a good download.

    You might want to put a short pause in the script so that the DB can update from PayPal, or put in a warning that it may take a minute or two for the transaction to complete.

    I’m mainly interested in examining your script because I’m in the process of teaching myself PHP (been a C++ programmer for 3 decades now), and I’m looking for ideas for improving the simple PHP script I wrote to handle class registration for my CHL classes ( $10 is a real bargain to look at known working code that does something similar to what I want. Examining other’s code is the fastest way to come up to speed in any programming language.

    Depending on how much time I can shake loose for this, I may want to collaborate with you on some PHP projects.

  27. Kidino said:

    Thanks for the feedback Howard. Yeah, I suppose there was a bit of a delay with the IPN. Paypal was not fast enough to send the notification to the IPN handler, so the customer got the thank you page before the Paypal can send the notification for the handler to create the customer’s detail file.

    In my earlier development, I had something like this in the thank you page “Our system is still processing your order. Once it is done, you can download your purchase from {DOWNLOAD PAGE}”.

    Maybe I should put that there… :)

    Yeah, looking forward to working with you on PHP. And I agree with you, when you are a programmer (any language), the fastest way to learn another language is to look at examples, etc…

    When it comes to the web, I think PHP is best.

  28. Jerry Leventer said:

    Looks great, Kidino. This will be helpful for a lot of people.

  29. admin said:

    Yep. Thanks for dropping by, Jerry.

  30. Peter Koning said:

    Will this support a 3rd party affiliate tracking system where an affiliate gets a unique link to the sales page and the sale tracking code can be added to the confirmation page?

    Let me know and I’ll tweet/blog this for you Kidino.


  31. Kidino said:

    Hello Peter. Of course it supports 3rd party affiliate systems. Since you have access to customize the Thank You Page and the Download Page, you can put the affiliate system’s code there. Oh, you also get transaction ID variable and amount, if that is need too in the affiliate system code.

  32. Nick Tart said:

    Hey Kidino,

    This seems like an awesome script, but I can’t get it to work properly. I can get through the PayPal transaction just fine, and then I click “Return to Merchant Site” and it takes me to the “Thank you for purchasing…” page. Dandy!

    But when I click “Click here to proceed to the download page.” it just says “Purchase Details Not Found. Contact Administrator.” I saw in a previous comment that you recommended chmod 777 the simpleipn folder. But I don’t know how to do that.

    Also, I purchased it in production mode and have yet to receive the automated email.

    Do you have any suggestions? They would be much appreciated!


  33. Matt said:

    Hi Iszuddin,

    What a great freebie script you are providing here. It looks much more powerful than some of the paid IPN scripts I’ve seen.

    Also, I agree with Glen and Garret. An Admin/Setup GUI would make a world of difference for this cool little script. I think they do realize that editing the settings.php script itself is pretty straight forward and easy to understand, however, there’s a vast majority of folks out there that simply hate editing scripts manually and/or are simply too intimidated by the code and become confused as to what they are supposed to do.

    Providing a simple setup GUI would address this issue and make your little Simple IPN script quite saleable. It really wouldn’t even be very difficult to do. But if you really can’t be bothered to write the setup wizard, there are tools that can code it for you. One such tool is available at:

    I know there are other, similar scripts that do the same thing but that was the one I could think of off the top of my head.

    Anyway, thanks for the cool script.


  34. Kidino said:

    @Matt – Thanks for sharing this Matt. I will look into it. Among the reasons why I am not so keen on developing a GUI is I don’t want to make the script big. Wanna keep it small… but I will look into your recommendation.

    @Nick – Referring to my reply to TX_CHL, I suspect that there’s a delay in the IPN data. What you can do is don’t give the link to the download page in the thank you page. The customer will get an email when the IPN data is processed. You can easily remove the link to the download page in the tpl_tqpage.html

    I will look into your purchase and will get back to you.

  35. Matt said:

    Hi again,

    I understand you don’t want to make the script big and I don’t blame you there. No need to bloat it up with a bunch of unnecessary code. But I don’t really think it would make it much bigger than it already is.

    Basically, you would just write one more file called setup.php which would provide simple instructions on how to set it up and give the user a GUI interface to change all the settings in settings.php w/o having to manually edit the file in notepad.

    In other words, they would upload the script and point their browser to setup.php which would list all the customizable variables in settings.php and provide a text input to type in your custom info. There would be a button at the bottom of the page to save the new settings. Upon clicking the button, the new info would be written to the settings.php file. The setup.php file would then be deleted so no one else could change the settings.

    Anyway, if you would like to see an example of what I’m talking about, I could upload a script that does this and send you a link via email so you can see for yourself what I mean.

    Let me know if you’d like to see an example.


  36. Telephone Investigations – Reverse Phone Search Databases | Business Telephone System said:

    [...] Simple IPN: Free Paypal IPN PHP Script for Digital Download Products [...]

  37. Kidino said:

    Hey Matt, thanks for the feedback. I was thinking of doing something like that. Well, maybe in the next update. That will be a cool addition, eh ..??

  38. Nick Tart said:

    Just to update everyone… I had a problem with this script but this problem was fixed by capitalizing a few letters. Make sure you pay attention to case-sensitivity and the script will work great!

    I recommend it to anyone who asks!

    Thanks for your help, Kidino.

  39. Matt said:


    Yes, that would be a very cool update. In fact, in the next week or two I may go ahead and just purchase the code and write the setup myself if I can find the time. Right now, I simply cannot afford to get side tracked with it. But in a week or so I may be able to free up some time to work on it. :o )


  40. Kidino said:

    Yeah Nick. Thanks for the update. It appears that your email address at Paypal is CASE SENSITIVE. In most cases it’s in all lower case.

  41. Kidino said:

    Sure Matt. No problem.

  42. galihrock said:

    i cant find this files (XXXXXXXXXXXXXXXXX.php) on this script. so it doesnt work..

    when its take to thank you page and i click the download link. its appear :

    “Purchase Details Not Found. Contact Administrator.”

    can u help me?

  43. Kidino said:

    galihrock, one of the two is happening…

    - the IPN data hasn’t arrive yet
    - the ipn.php cannot write to your folder

    with the IPN data, you cannot do much about that. but if it’s the write permission, try giving the folder where you uploaded the files an at least a 666 permission.

  44. Kidino said:


  45. Wang Qianjun said:

    I want to know whether we could use this script for other payment handling panel beyond paypal. We hope to use Alipay ( , one of biggest payment handling panel in China to receive payment for our paid ebook. Could we install and set this script on our web site to handle ebook delivery and aviod ebook copy with thanks?

  46. Kidino said:

    Alipay heh? Well this was created to work with Paypal’s IPN system only.

  47. Free Paypal IPN Script - said:

    [...] one I tested is called Simple IPN, and it works quite well with digital download [...]

  48. Paula said:

    What a great addition to anyone’s toolbox!!

    Thanks for a great script and for giving it away!!

    I must buy the full source code to play around with!!

    Thanks again

  49. Reins said:

    Wonderful script. Unfortunately I have been trying to make it work but I cant.
    I keep getting the “Purchase Details Not Found. Contact Administrator.” message.
    I have changed the folder´s permission containing the ipn file to 777 and still not working. Any ideas?

  50. Kidino said:

    There’s one thing that you can try. Make sure your paypal email is all in lowercase. Don’t do something like … instead do

    I believe IPN sends data all in lowercase. But if your paypal email address you set in settings are in upper-lower case, then it will not match. Purchase data will not be saved.

  51. Reins said:

    Thanks, I checked the settings file, paypal email is in lower case, but I keep getting same error messsage.

  52. Reins said:

    I just realized the “XXXXXXXXXXXXXXXXX.php” file is not being generated, that might be why this is not working. Any idea how to solve this. Regards.

  53. Kidino said:

    the XXXXXXXXXX file is not being generated either when1) the IPN data cannot be verified 2) ipn.php does not have write privilege 3) connecting to Paypal for IPN verification failed.

  54. lieven said:

    Has anyone tried this with Hostgator hosting?
    the xxxxx.php is not genereated … :(

  55. Paula said:

    I am with Hostgator – and it works perfectly – sorry!! Would the hosting matter?

    Have you seen the thread above yours re the 3 reasons it could be?


  56. Kidino said:

    First of all, sometimes I write with Kidino, sometimes with Admin. Both are me.

    And Paula, thanks so mentioning that things are working fine with Hostgator. By right, you shouldn’t have problems with any CPanel-based hosting, which Hostgator is. I’ve also tested it on Dreamhost — no problem.

    But I haven’t tested it on a Windows-based hosting. So Windows hosting should beware.

  57. Bernd L said:

    As Musaz said:

    I receive this message after having made a test transaction via test accounts (sandbox). This ist echoed on my Homepage, when the test buyer is sent to download the digital producht

    Purchase Details Not Found. Contact Administrator.

    The chmod of the download folder is 755. Folder withe 777 are not allowed by the host, but normally 755 does ist.

    I hope that you are willing to give me a hint how to workaround this result of your great script!? :-)

    Regards and Thank you from

  58. Cheyne said:

    Great script, im having the issues of the file not being generated either, I understand the issue and ill try to debug it myself.

    No need for a GUI, that will just add more complication to an already elegant script , its very simple to setup as it is. My thoughts are that if your that IT illiterate that you cant edit a few simple variables then you really shouldn’t be attempting payment gateways. I certainly wouldn’t want someone building my secure payment systems who cant edit a script file.

    The script can be setup without any prior PHP experience, and the author has done a great job in detailing the variables.

    If I can solve the file write / IPN auth issue, ill pay for a copy of the script for sure.


  59. Cheyne said:

    Still got major problems with the script … All works fine, cept the file isnt generated.

    CHModded everything to 755 , and that still wont work.

    My host wont allow CHMOD 777, when I do it, they wont allow the page to be opened. So thats off.

    Does anyone have this working with 755 ?

    Would appreciate some email support if you’ve got time.. Im an experienced engineer, so no hand holding is needed, just a heads up or some tips on what I should try.

    IPN seems to be working ok … Even forced one out of PayPal , but nothing generates.


  60. Kidino said:

    Actually, you don’t really need a full 777. Even a 666 is enough. 755 won’t work because it does not grant write permission. Try 766 if you can get that to work. Or at least 666.

  61. Cheyne said:

    Called my host , they say 755 is all they will allow .. Very annoying , I cant get this working, the files arent generated.

    Looks like I cant use this script … dammit

  62. Cheyne said:

    There is an alternative solution you may want to consider in further releases.

    For those with the permission errors who are unable to write files to the file system, you may want to have an option to store the transaction number along with the timp stamp into a database instead of creating a file.

    Users download from something like download.php?id=xxxxx , this xxxx is then queried against the database for its presence, and its expiry, if all checks out, present the download, otherwise present the expiry (or non existent) number.

    If you would consider sending me a free copy of your script with the open source, ill look at developing the code my self, and ill supply it back to you, as you’ve already done the hard work.. It just needs some modifications for the permission impaired :)

  63. Kidino said:

    Hello Cheyne, yes. We can do that. But the initial idea was to keep this simple and not have to setup a DB. :) Try asking your host if there’s anything that they can help to solve this. Tell them that a script needs to create files in the folder. Ask them if they have any solutions. Where do you host BTW?

  64. Cheyne said:

    Hey Kidino,

    Already asked, and nope, they wont budge. I told them what I was trying to do, they couldnt care less.

    Yep, fully understand your avoiding databases, and im not suggesting you change your script, I was just just saying that I would like to use your script, although I cant, I can how ever re-write it to work from a database which would solve my problem.
    You dont have to use it, but you may chose to offer it to anyone else who has the same issue as me. (Looks like you’ve got a few).
    I wouldnt mind keeping my purchaser details in a database anyway and was going to look into that.

    Im in Australia, its not a big name host.

    Anyway, you’ve got my email from this post, if your feeling kind enough to send me a copy , ill email back to you what ever I come up with … Use it or dont use it , its up to you.


  65. Tim Toy said:

    Hello Kidino,

    First of all thanks for this great script. Secondly I have an observation/suggestion on the error :

    “Purchase Details Not Found. Contact Administrator.”

    while testing this script in Paypal sandbox, I noticed this problem which is mentioned by some friends above.

    But I also noticed that if you wait for a minute and again refresh this error page, the proper download page with all the file links appears. So it seems that basically the problem relates to late arrival of IPN clearance from Papal.

    I think one probable work around can be to insert a one minute countdown timer on the thank you page and instruct the buyers to click on the download link only after the finishing of the countdown timer (so as to allow for the late arrival of IPN notification from Paypal.) This way we can substantially reduce the occurrence of this error.

    Just a thought. What do you think?

  66. Kidino said:

    Hello Tim, an alternative I mentioned earlier was to update the thank you page and tell them to wait for the download email. :)

  67. Adam said:

    Also having problems generating the page, I have other PHP writing code just fine its very strange, my Paypal account is all in lower case and everything else looks good in the settings.

    This is exactly what I wanted just need to get it to work.

    Looking forward to new versions


  68. Adam said:

    ok after some work I had to end up removing my PHP installation and my website off IIS, I got it generating the pages now and files are able to be downloaded just fine, so if anyone has trouble and permissions are fine maybe try that.

    But there is no email being sent other then the paypal one.

    Is there anything special needed to be done to make that happen?
    or need to use the IPN settings under paypal?

  69. Dragan said:

    Downloaded the script, everything seemed fine, but always, ALWAYS getting this same error!

    “Purchase Details Not Found. Contact Administrator.”

    I tried everything suggested here in the comments, nothing worked. Since I have two servers, I tried on both of them, hoping I’m missing something with the first one, and again the same message.

    “Purchase Details Not Found. Contact Administrator.”

    One of the servers is on dreamhost, that you said you checked and made it work there. Well, still same error!

    All your answers were pretty vague about this same error being reported over and over again. It’s like you are dismissing this error happening to anyone.
    There must be a solution. Was happy to buy script and refer to many other people I know will need it, but this just doesn’t fly. Apart from that, lost half a day that will never come back :( ((

    Off to find a working solution. Cheers!

  70. Kidino said:

    Hmm, is on DreamHost and is working well (try the $10 :P ). Well, I just got a baby yesterday and the mommy’s still at the hospital. Will be fetching her and the baby later this afternoon. So I hope you understand with the delay on this…

    Dragan, if you sent this message using a valid email address, I will get back to you on this. And looking forward to helping you with SimpleIPN setup on DreamHost.

  71. Dragan said:

    Thanks for the answer!

    Congrats on your new addition to the family!!! ;)

    I just love your script and would really like to make it work! Hopefully, we’ll figure it out. My email adress is valid.

    Cheers, D.

  72. Dragan said:

    I tried to figure out what was wrong with the script some more time and I think there is 2 scenarios where this would work, without showing the infamous Purchase Details not Found message.

    1) Make the xxxxxxxx.php be created in a different empty folder since some hosting providers (obviously) dont allow you to run a script (ipn.php) from a chmod 0777 folder (that’s kinda logical, no?) :) ))
    2) Take the IPN txn_id and add it into database and then use it from the DB instead of the file.

    Still don’t know how to make 1) or 2). :) )))

    Any programmers out there can help with a possible solution on this?. Must be a very simple solution, altho I’m missing something obviously + I’m not a programmer :) )

  73. Kidino said:

    Dragan, I believe you got my other email. I am here to help you out with this since you are on DreamHost.

    By the way, I don’t plan on adding the DB feature to SimpleIPN as my objective is really to make this easy to use. Adding the DB will require users to setup another thing – DB.

  74. David said:

    First off, let me say thank you for writing this script.

    I am using Sandbox to test out the script and while I am able to purchase the file, I never get an email. Is it because I am using Sandbox?

    Additionally, when I go to the Thank You message from Paypal’s “Return To Merchant” button, I click the download link and get the same message as others:

    “Purchase Details Not Found. Contact Administrator.”

    I tried the CHMOD 777 but I am wondering if this is all happening because I am using Sandbox. I would understand why the email may not coming in (because I am using Sandbox) but the download link should be still working I imagine. Or maybe not…..Do you recommend I try it with my real PayPal account and not with Sandbox? Thanks Again.

  75. Reins said:

    FYI, I did two real paypal try outs and I couldn´t make it work anyways.

  76. Kidino said:

    @David, email should come even if you are on Sandbox, especially if you made trial accounts with real email address. Can you tell me more about your host?

    @Reins, tell me more about your problems.

  77. TimR said:

    I tried everything and still no email and link on thank you page throws the “details not found” error. Could it be that somehow the PHP files got corrupted?
    I enabled IPN on paypal with URL …/ipn.php
    is there any other setting to enable/disable on paypal or website for this to work?
    Thank you for this great tool ! I just wish I could make it work.

  78. David said:

    host is, mid level shared hosting account, unix, what else would you like to know? what could be “off” with the hosting so I know what to ask them?

  79. Adam said:

    I also have had no luck with emails after changing my SMTP service and even reinstalled PHP nothing works. “Am on IIS6 and windows server 2003″ PHP 5.2.6

    The error from my new SMTP server is this

    MailEnable: Message could not be delivered to some recipients.
    The following recipient(s) could not be reached:

    Recipient: [SMTP:]
    Reason: 501 Invalid Address

    I looked the error up it might have something to do with permissions but phpBB the webmail client I use and my normal emails send and receive just fine. also I have given the folder full permissions to everyone just in case it was that. well any ideas to fix would be helpful

    Thank you.

  80. Kidino said:

    @Adam, this has never been tested on a Windows/IIS platform. The script uses mail(), which could be a problem.

    @Others, I’ve been working with Dragan and it appears that it might not even be a permission problem. If you are testing this with Sandbox and getting errors, make sure you use verified Paypal test accounts. Otherwise test this live and use some other people’s Paypal email to test.

    By the way, still checking problems with Dragan if I might find anything else.

  81. admin said:

    Found that most of the problems users are facing when Transaction File is not created, is because they are using PHP4 while SimpleIPN was coded for PHP5. I changed the codes to be working with PHP4 instead now. You can download the new compilation and give a try.

    Another problem with emails not being sent, it could be because the web hosting has some rules about sending email where the From email is not hosted by the server. To be safe, only use email address that is managed by the server for $support_email_address.

  82. Reins said:

    Will try with the new version and let you know. Thanks.

  83. TX CHL Instructor said:

    I found a tool that looks like it would be useful for playing around with this script. It’s called XAMPP, and it’s an open-source tool suite that lets you run a web server with PHP and MySQL on your machine so you can test scripts before you upload them to your host. Just google xampp. Be sure to make a note of the FAQ and installation pages (I just copied them locally). It took me several tries, but I managed to get it up and running on my laptop, and I’m now able to do testing of new ideas in PHP without having to build an elaborate test script to run on my host.

    BTW, I saw some folks who had some problem with their hosting and file permissions. I really think that using a database is the way to go, and I may be re-doing the script to use MySQL.

    Shameless commercial plug: I have a hosting service at

  84. Jas said:

    I’m confused – after I edit the php files accordingly, I store them on my webspace (not sure exactly where to store them either), then what? what link do I use for each of my products? and is there anything else I need to do?

  85. Jas said:

    oh, and do I need to enter an IPN URL in PayPal?

  86. Dragan said:

    Hi guys,

    Last night Kidino troubleshoot the problems on my server where I tried to use this script (resellerzoom) and after hours of careful testing, he found a solution that will possibly solve all the “purchase details” errors and problems for many of you.

    We come to understand that there is a whole set of issues and rules around IPN and different hosts, and quite possibly, they should be demystified with the new script release! :) )

    Kidino, wanted to say thanks for everything you done man and for being patient enough to solve this problem. The script is definitely the best possible and most good looking solution I’ve seen around. As you could see from my previous posts here, at first I was frustrated that I couldn’t make it work, so I was going around looking for solutions!

    None of them were classy as simpleIPN, thats why I was so determined to make it work. Thanks to Kidino, that happened last night, and quite possibly this new found information will help improve the script and make it work by default for many of you!

    Kidino, you are the man, and thank you for sharing this script with us! You deserve the best there is!
    After all the research and lack of good IPN paypal functional scripts, making this work was a real prize!

    Thanks, D.

  87. admin said:

    @TX CHL – thanks for your input. Yep, XAMPP is a cool tool. I have it in my localhost. But when it comes to e-commerce payment testing, you need to test it online though…

    @Jas – no need to write the IPN URL. Just edit the settings.php and then from your sales letter, link the order button to ipn.php?buy. You can store the files in any folder.

    @Dragan – thanks for the input. And thanks for allowing me to test it on your web hosting. We sure solved a lot of things, and surprisingly, a lot of them are not even permission issues.

    Most of the things are 1) PHP4-PHP5 issues. 2) mail() issues where the web hosting would not allow sending emails where the from is not hosted/managed by the server. Read update above.

  88. Tim said:

    Still doesn’t create page . no email is sent. I thought it was FrontPage 2003 but removed FP server extensions and still doesn’t work.
    Should the files be uploaded to the root directory?

  89. Tim said:

    Still doesn’t create page . no email is sent. I thought it was FrontPage 2003 but removed FP server extensions and still doesn’t work.
    Should the files be uploaded to the root directory?

  90. Tim said:

    I have to say this!!!!
    Kidino, the script is great.
    after hours of troubleshooting the code…. (good way to learn some PHP)
    my problem was that PayPal was using an OLD EMAIL ADDRESS, therefore the confirmation was comming with the old email address which was different than the one I set in settings.php…… there is a routine in the code that handles this but does not send you a message that there was an error in the validation.
    That’s why the link didn’t work and the email never sent… the program stops right there after creating the fake link and nothing else is created (xxxxx.php page, email, DL page..)
    check the confirmation page from PayPal for old email addresses and use the same one on settings.php….

    Kidino, you have some competition from ngcoders but your application is by far the best!!
    Thanks for the great work

  91. Tim said:

    Well, as competition goes, well, I am aware of those. Not really trying to compete with others though. Just thought this is something I should share around. Will check the code again regarding your error.

  92. W said:

    Hi Kidino, I have a small question.

    So after setting op the files on your website, how do you prevent that people directly surf to your protected file ?

    I want to make sure that nobody can just give the link to others, letting them have a free download.

    Thanks in advance!

  93. Kidino said:

    @W – Did you read the settings and watch the video yet? The files does not have to be at a published web area. It can be under the web root folder.

  94. W said:

    Aha! Wow thanks, I’m sorry I did not get that directly, but that would solve all my problems indeed.

    Thanks so much for your reply =)

  95. W said:

    Hi Kidino, I still have a problem :( Don’t worry, I will pay the 10$ when it works, I must be doing something wrong.

    Do I have to insert something in my IPN settings – link? Because right know it is not yet active.

    Right now when paypal sends me to the Download page, and I click the link I get “Purchase Details Not Found. Contact Administrator.”
    My pdf file is in a root folder, my sipmleipn folder is public.

    Je vous remercie de tout mon coeur.

  96. Wang Qian Jun said:

    Dear Kidino,

    Could you pls help me design one script for Alipay just like Paypal IPN script with thanks? We are selling ebooks and hope to have one script to finish digital delivery just your script. Pls see the alipay and give me response whether you could make it. Thanks.

    Hope to hear from you soon’!
    Wang Qian Jun

  97. W said:

    I read all the above messages. Sorry I didn’t do that before!

    So my folder has 777 persmission, my “page.php?dl-6EB106728M8996143″ (exapmle) codes work perfect,
    my email arrives with the link,
    but I still get the “Purchase Details Not Found. Contact Administrator.”

    My host is asmallorange, pretty good. I have no idea why this will not work :( any ideas? (I have tested live too)

    Sorry for bothering, but thank you very very much!

  98. Kidino said:

    Sometimes it takes a while for the IPN to arrive.

  99. W said:

    Hm, but even after hours it’s not there. I’m right that I don’t have to put something in my paypal IPN settings?

    What would cause the IPN to not arrive?
    Thanks again.

  100. Adam said:

    I have tested the SimpleIPN script and have overcome many problems such as the page not being generated and not receiving emails.

    For PHP 5.2.9 I have used IIS 6 and Apache.

    Apache used the 2.2 DLL it worked fine with emailing and generating.

    IIS 6 had problems with the emails so had to change this PHP.INI ” sendmail_from = My Email ”

    PHP 5.3.0 Apache Did not like the 2.2 DLL

    IIS Fastcgi did not want to co-operate with the script at all giving debug erros.

    Pretty much its been said before if your hosting company is not giving you the right permissions or your PHP is not configured correctly you will get ““Purchase Details Not Found. Contact Administrator.”

    If your email are not being set try adding the line in PHP
    ” sendmail_from = My Email ”

    Also I have a question for you Kidino would it be ok if I ask it in email?

  101. W said:

    Thanks for the reply Adam. My emails are working great, just the dl page does not.

    How did you configure your PHP settings correctly? I mean what do you have to change there?


  102. W said:

    You probably mean the 777 permissions … but that’s already there. Damn I don’t want to give up, but I tried so much :(

  103. W said:

    You probably mean the 777 permissions … but that’s already there. Damn I don’t want to give up, but I tried so much :(

  104. Kidino said:

    @W – Contacted you via email.

  105. Adam said:

    Kidino if possible could you contact me via email I have a purchase question (A brief one) that needs answering

    Great to hear you emails are working, the PHP settings I have are almost stock with a few extensions loaded and some locations specified.

    What hosting provider do you use?(Assuming its not local) if you do not have direct access to the machine via SSH / Remote Terminal. Setting up PHP will be done with the Cpanel/Plesk or whatever Tool they give you if that is the case they should be able to help you with setting permissions.

    I could maybe take a look to see what the problem might be with your PHP settings if you are still having further trouble with it.

  106. Setting up paypal with your website said:

    [...] Re: Setting up paypal with your website ey … can I plug my free Simple IPN Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — [...]

  107. Download Page Protection - Is It This Simple - Page 2 said:

    [...] Re: Download Page Protection – Is It This Simple Just an option, do check my free Simple IPN Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — [...]


    [...] Re: I NEED HELP ON HOW TO SET UP A WEBSITE WITH DOWNLOAD PAGE ey … can I plug my free Simple IPN Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — [...]

  109. Keven said:

    Hi Kidino, when I change the permissions of the directory that your scripts reside in (we’ll call it ‘store’) to 777, I suddenly get a 500 server error whenever I call load /ipn?buy. Called the host and they apparently won’t let the .php files run in a 777 directory. When I set the permissions back to 755, everything works with paypal, but I never get any .php files written to the directory, so I of course get the same error everyone else sees. Is there any sense in modifying the scripts to try to write the temporary files to a sub dirrectory with 777 so that my scripts in the 755 directory can still run? Just grasping for a possible way to work around the apparent host restrictions. Thanks for your time!

  110. Joe said:

    Why is it when I have followed all of the directions ala updating settings, uploading file to my website ala earthlink. and making a button on my sales page to link to inp.php?buy
    When I try the button or work with the link directly I received a pop up window saying “FILE DOWLOAD…Do you want to open or save this file” What am I doing wrong.

  111. Francesco said:

    Hi, I’ve some problem with generation fiel XXXXXXX.php.

    The folder n my site has a all permissions. For tested i’ve created a file and correctly created.

    The setting in setting.php is correct.

    The IPN in sendbox is valid

    When I tested click to the button return to mercha… for download the result is:

    Purchase does not match product details.
    Debug Mode. Here are IPN data and transaction result.



    || : ||
    |1.00| : |01.00|
    |EUR| : |EUR
    |Pending| : |Completed|

    Purchase does not match product details

    Help me. Thanks

  112. Kidino said:

    OK, there are two issues with the above.

    1 – 1.00 does not match with 01.00, I think the 01.00 is yours. Check that in the settings and fix it. Make it to 1.00.

    2 – The status does not match. Sometimes on a Sandbox, when the test email account is not a verified account, you will get a Pending status.

  113. Francesco said:

    Hi I’ve modify but the result is the same.

    this is my log:

    Purchase does not match product details.
    Debug Mode. Here are IPN data and transaction result.



    || : ||
    |1.00| : |1.00|
    |EUR| : |EUR
    |Pending| : |Completed|

    Purchase does not match product details

    transaction_subject: Sample Product
    txn_type: web_accept
    payment_date: 05:24:29 Sep 29, 2009 PDT
    last_name: User
    residence_country: US
    pending_reason: unilateral
    item_name: Sample Product
    mc_currency: EUR
    payment_type: instant
    protection_eligibility: Ineligible
    payer_status: verified
    verify_sign: AFcWxV21C7fd0v3bYYYRCpSSRl31ARxTHGZtZDWxlNI7V.AfPC2gnPru
    txn_id: 4KP38061RF001112X
    test_ipn: 1
    tax: 0.00
    first_name: Test
    quantity: 1
    payer_id: DNNWCR5CBZ8P4
    item_number: SPL101
    payment_status: Pending
    handling_amount: 0.00
    shipping: 0.00
    mc_gross: 1.00
    charset: windows-1252
    notify_version: 2.8
    merchant_return_link: Return to Merchant

    The status does not match. But in Sandbox are two days enad the status always is pending

    In my account test I’ve recevied the mail:

    Sep. 29, 2009 05:34:21 PDT | Transaction ID: 8EY66622HY765333W

    Hello Test User,

    You sent a payment of 1.00 EUR to

    It may take a few moments for this transaction to appear in your account.



    Instructions to merchant:
    You haven’t entered any instructions.

    Purchase Details

    Description: Sample Product, Item#: SPL101
    Unit price: 1.00 EUR
    Qty: 1
    Amount: 1.00 EUR

    Subtotal: 1.00 EUR

    Total: 1.00 EUR

    Payment: 1.00 EUR

    From amount: $1.40 USD
    To amount: €1.00 EUR
    Exchange rate: 1 USD = 0.714285 EUR

    When return in my site the result is the same and the email don’t arrive to my account:

    Thanks for all I hope to resolve.


  114. Francesco said:

    Is it possible to have a reply???!!!!!???

    1) The permission on my directory is ok.
    2)The formta money in setting file i s correct.
    3) The url return in paypal i s ok …(/ipn.php)

    I’ve verified that when I pay in sandbox I receveid a mail but non receveid mail in my account with link for download. I’ve paid for what?

    is is possible contact you with email thanks?

  115. H-J P said:

    Dear Sir,
    I´ve purchased your product and it works in sandbox on my server.
    With my regular paypal-account there is no email and no download page created.
    I´d be glad to get any help for solution

  116. Barry said:


    Any progress on that GUI mentioned was coming soon in a previous post?

  117. Francesco said:

    thanks for all very thanks. (sorry for my english)

    I’ve modified only this setting in this mode:

    My page setting.php is

    $debug = 1;
    $paypal_sandbox = 1;
    //this is a business email in sandbox
    $paypal_email_address = ‘’;
    /7this is a support email
    $support_email_address = ‘’; // your email address for support

    My ipn.php ,tpl_dlpage.html, tpl_tqpage.html, function.php, and page.php I haven’t modify. I must modify something?
    I did everything described in the example.

    In sandbox I’ve seen that the IPN si valid, but the problem is the return page. I must setting the url return in sandbox tpl_tqpage.html o ipn.php ?

    There is something that I must setting?

    Is it possible have an example for all page that I must modified?

    If you want I give you a password of test my site, there is no problem is only for test.

    My link test in my site is

    The user and password for buy is
    password: SBS01mig.

    Thanks for all

  118. Manolo said:

    Hi Kidino,

    First: Congratulations for your new baby! I hope you get a good night’s sleep every now and then! By blessings to your family.

    Second: Thank you very much for being so generous and sharing this powerful tool. $10 is still a bargain!

    I just have one simple question.

    I’ve installed it and it works great all the way (Hostgator hosting): Reading IPN, sending emails, smooth transaction, getting ty page and dl page, BUT…

    The downlaod links are not working. I get the message:

    “Download file ID 0 is not valid. Please contact webmaster.”

    What should I fix? I tried adding the full dl link (including http) in the settings.php file.

    I hope you get the time to read this…



  119. Manolo said:

    Two suggestions:

    1. The option to add a 3rd email address, in order to subscribe customers to any newsletter with any Autoresponder service.

    2. To limit the number of IP’s for every customer. That way the link gets shared less.

    Just my 2 cts.


  120. Francesco said:

    I’ve modified a ipn.php:

    $fp = fsockopen ($paypal_ipn_url, 80, $errno, $errstr, 30);
    $fp = fsockopen ($paypal_ipn_url, 443, $errno, $errstr, 30);

    The result I think is good:
    Debug Mode. Here are IPN data and transaction result.


    transaction_subject: Sample Product
    txn_type: web_accept
    payment_date: 09:58:00 Oct 03, 2009 PDT
    last_name: Foti
    residence_country: IT
    pending_reason: unilateral
    item_name: Sample Product
    mc_currency: EUR
    payment_type: instant
    protection_eligibility: Ineligible
    payer_status: verified
    verify_sign: AcB-sRCzd0QMTVJSN4Aeoi-ylYaRAUqj8QlfKLKFaJH-hDisC4J5aXXb
    txn_id: 0G2724353D5534527
    tax: 0.00
    test_ipn: 1
    first_name: Francesco
    quantity: 1
    payer_id: RC2Y8JAASF7HQ
    item_number: SPL101
    payment_status: Pending
    handling_amount: 0.00
    shipping: 0.00
    mc_gross: 1.00
    charset: windows-1252
    notify_version: 2.8
    merchant_return_link: Torna al commerciante

    But the download page don’t exist (in my folder site is all ok permission and all)

    when I copy a link in browser I have this result

    Purchase Details Not Found. Contact Administrator.

    and the page “….page.php?dl-0G2724353D5534527″ for example don’t created and email don’t send.

    Thanks for all.

  121. Francesco said:

    Another thing:

    I’ve two account business and personal in sandbox.

    1. execute a ipn.php?buy
    2. Loggin in sandbox
    3. I do a payment.
    4. The result page is this:

    Debug Mode. Here are IPN data and transaction result.


    transaction_subject: Sample Product
    txn_type: web_accept
    payment_date: 10:13:43 Oct 03, 2009 PDT
    last_name: Foti
    residence_country: IT
    pending_reason: unilateral
    item_name: Sample Product
    mc_currency: EUR
    payment_type: instant
    protection_eligibility: Ineligible
    payer_status: verified
    verify_sign: AFcWxV21C7fd0v3bYYYRCpSSRl31AXA8OcXUwiiCzIropy4SzaMUcGI2
    txn_id: 1GC691144F652144R
    tax: 0.00
    test_ipn: 1
    first_name: Francesco
    quantity: 1
    payer_id: RC2Y8JAASF7HQ
    item_number: SPL101
    payment_status: Pending
    handling_amount: 0.00
    shipping: 0.00
    mc_gross: 1.00
    charset: windows-1252
    notify_version: 2.8
    merchant_return_link: Torna al commerciante

    5. A email arrive in my sendbox account test personal with information for download but in the email tha I’ve set in the file setting.php ($support_email_address = ‘’;) i don’t receveid nothing is normal?

    6. Is normal that I can’t a download in the link that I’ve posted?

    Thanks for all and sorry for all

  122. Kidino said:

    WOW, I am getting a lot of response today. Really does makes my day. For Manolo, when you get unknown File ID, that’s normally the problems with the file settings.

    For the rest, I need to get back to you later though.

    Just some news, I am releasing the installer interface, hopefully this week.

  123. Kidino said:

    By the way, I found that most problems that you guys get when the emails are not sending and file is not created, it’s because the purchase is coming from an unconfirmed email account. So you get a status = Pending and Pending Reason = unilateral.

    Will check more about this though. But so far, I’ve read that nothing was paid for that kind of payment.

    And when people pay with eCheck instead, you too get a status = Pending. IPN will send data again when the eCheck clears. And ipn.php will process it.

    But maybe the script needs a little adjustment at the thank you page.

  124. Francesco said:

    Ok Kidino, I hope to resolve all.

    I must attend now???

    thanks for all.

  125. Francesco said:

    Hi kidino,
    this is strange because my two account business and personal are verified.

    When I do a payment email to my account in sandbox arrive, and my IPN is verified and in test in sandbox is good,

    But the email doesn’t arrive e the file didn’t created (my permission is good and folder is ok and the url return in the business is ok the llink to thankyou page)

    Thanks for all

  126. Manolo said:

    Hi Kidino,

    Well, it’s Saturday…ALL of us should have plenty of time to address this issues!

    Thanks for your repply, please tell me what to check in order to fix it. I’ve followed instructions almost 10 times now.

    One more update:

    i was testing it with my wife’s real paypal account and it was ok. But when i tried directly with several international credit cards (all of them have been used to pay with paypal checkout before), it says:

    “The card you entered cannot be used for this payment. Please enter a different credit or debit card number.”

    This cards are from El Salvador (VISA and AMEX). never had problems with them before.

    Please check that out, it can be a major sells buster.



  127. Manolo said:

    This is for PAULA,

    Hi Paula, I see you aer hosting with Hostgator as well. I need to contact you so I can ask you some questions about the problems I’m having.

    Please contact me at manolosal @ hotmail. com


  128. Mepoet said:

    I’ve had all the problems listed above also and tried all the solutions and have all the failures. One thing that happened though is that after 4 purchases in 3 days on paypal, ( at 10 cents each) I finally started receiving both merchant and customer mail from paypal. I changed nothing, so the problem, at least in my case, is that paypal simply was not sending the email to to the merchant EVEN THOUGH the email was verified.

    I am hosted on hypermart but I am going to start an account on Hostgator now. Thanks for the heads up, Paula ( are you single :-) . If that doesn’t work I will try Dreamhost. And thanks Kidino Admin for everything. You’re a genius. Hopefully you won’t hear from me again about problems, only success ( and $10 :-P )

    Since I have never been able to get far enough to see the ad credits on the download page, I don’t know what they look like. But even with a $10 payment I doubt if I’ll want to remove them because I think everyone should know where to get their own Simple IPN.

  129. Mepoet said:

    I have read and reread and followed all instructions and suggestions, watched the video several times, even changed hosts to Hostgator. I still can not get the simple ipn to work. Any permissions other than 755 throw an error. And of course I get the “Purchase does not match product details” message.
    please tell the secret to making simple ipn work on Hostgator

  130. Manolo said:


    Just make sure your domain is fully functional with HGator (not the temp domain, but your actual domain). 755 is working great for me.

    Review every character you have typed: prices, commas, etc. Or try to start all over again.

    Hope you fix it.


  131. Mepoet said:

    my actual domain is fully functional. I made a directory in public_html on Hostgator named shopcart and uploaded all simple-ipn files, I edited settings.php correctly, definitely, no mistakes. in fact I didn’t change anything but the email addresses and the price. And I receive email from paypal BOTH as seller and purchaser. The price displayed in paypal and in emails is correct. So there’s no mistake in what I edited.

    The shopcart directory was automatically set to 755. I can’t understand how 755 works for you. Kidino said it won’t work. And it doesn’t for me. I tried all the other permission combinations in all posts above for the shopcart directory and they all throw an error. Are you sure your directory is in public_html and 755?

    From my index page I linked to ipn.php?buy .Clicking the link goes to paypal but as usual gets the Purchase does not match product details on the DL page.

    Did you change any of the actual file permissions, like the Thank you page??
    What am I doing different from you did? Any help is greatly appreciated.

  132. Mepoet said:

    Kidino, After many frustrating attempts, and detailed instruction from Manolo, who says his simple ipn worked on hostgator… I still can not get it to work on my Hostgator. I don’t mind paying $10, even more, I’m ready and happy to do it, and I already got in trouble with my server for sending so many email to friends telling them what a great script this is, I am not a novice, but something is stopping me from getting this to work. Will you let me give you my password and then you set up simple INP on my hostgator account?
    Desperately Seeking Simple.

  133. Mepoet said:

    Thanks to Kidino simple IPN now works on my hostgator account. Regarding your thoughts on an ad on expired download links, Since the DL page must be deleted manually or with a cron job, I suggest putting another inp.php?buy link on the expired download for a ONE TIME OFFER for a second product at a discount. For example, my simple IPN directory is ipn01. If I make another directory ipn02 with the one time product in it, the link on the ipn01 download page could be /ipn02/ipn.php?buy and would take the customer back to paypal to purchase again.

  134. Kidino said:

    @Mepoet – Yep, that could work.

    You can install as many /ipn folders as you want. Name it anything you want “buy”, “order”, “sale”, “nothingrelatedatall”…

    And you can always customize the Download Page by editing the tpl_dlpage.html … Put ads on your download page, put optin form, put links to other websites, put links to affiliate websites, you can do anything you want.

    But as for the limited time offer thingy, or the one-time offer mechanism, you’d have to figure that one out yourself.

    I don’t have anything to help you with a one-time offer. Google for that, I am sure you’ll find something.

  135. Steve said:

    Great script!

    What PayPal product is required? Can I use this with PayPal’s Website Payment Standard, or do I need Website Payment Pro, etc?

    Thanks – Steve

  136. admin said:

    This is for PayPal’s Website Payment Standard ONLY!!

  137. Steve said:

    Perfect … Thanks for confirming Website Payment Standard!
    Cheers – Steve

  138. H-J P said:

    It doesn´t work on my puretec-account in production mode. Do I have to wait for changes in thankyou-page?

  139. Kidino said:

    Some extra details would help…

  140. H-J P said:

    Downloadpage and email is not created. This is the IPN-dump:

    We cannot verify your purchase
    Debug Mode. Here are IPN data and transaction result.


    INVALID: We cannot verify your purchase

    transaction_subject: Sample Product
    txn_type: web_accept
    payment_date: 06:41:30 Oct 09, 2009 PDT
    last_name: Probst
    residence_country: DE
    item_name: Sample Product
    payment_gross: 0.01
    mc_currency: USD
    payment_type: instant
    protection_eligibility: Ineligible
    payer_status: verified
    verify_sign: AQU0e5vuZCvSg-XJploSa.sGUDlpAD5UPyRV-KQMT14S7rzEKMlbocRD
    txn_id: 1PG40803MA5032228
    tax: 0.00
    first_name: Hans-J�rg
    quantity: 1
    payer_id: 5MKH3B28E2SDN
    receiver_id: FZMGKG6E5L3A6
    item_number: SPL101
    payment_status: Completed
    handling_amount: 0.00
    mc_fee: 0.01
    payment_fee: 0.01
    shipping: 0.00
    mc_gross: 0.01
    charset: windows-1252
    notify_version: 2.8
    merchant_return_link: Zurück zu david waddell

  141. Darrel said:

    Got it working until the point where I go to download the pdf file. When I hit the link is says “Purchase Details Not Found. Contact Administrator”

  142. Kidino said:

    That’s the case where the script didnot or failed to create the transaction file. Hmm… at this point, I can’t determine what’s wrong though…

    It could be…
    - permission
    - extra blank spaces in variables in settings.php
    hm… could be a number of things…

  143. Mepoet said:

    @ Kidino and all :-)

    I could not get simple IPN to work on my previous website, . I could not get it to work on which uses a cpanel, until Kidino helped me. The program definitely works in the “live” mode now, at least with the sample pdf and mp3. I have not uploaded my real products yet but I am in the process.

    I just tested it in live mode myself using the same setting Kidino edited in my settings.php and everything was fine except merchant and purchaser did not receive email generated by the simple ipn. *note to Kidino, I re-created and used the same mepoet address you created for me. I am assuming the missing customer email is paypal or hostgator’s fault, or even my fault. I will investigate that more.

    I don’t really care if the mail works, because the merchant
    ( me) got a message from paypal, and the customer (me) was able to download. Everybody (me) is happy, everybody got what they wanted, and the result is the same even if the devil is in the details.

    HOWEVER…out of curiosity I tried it in “test” mode just a few minutes ago, and it does NOT work in test mode. :-) Error message Purchase does not match product details.

    This must look familiar to almost everyone here.
    Wouldn’t it be ironic if everyone who is having the “Purchase does not match product details” error would go live, and it WORKED ! :-) . For me, testing simple IPN was like beating a dead horse. It would never work no matter what I did.

    I am not going to worry about “test” mode anymore. It works well enough “live” to receive payment and deliver a product and that’s all I really care about. After I upload my actual products I assume it will work as well as it does with the sample products.

  144. Paula said:

    Well, I’ve read many comments here on how the script doesn’t work – but I’d like to say AGAIN – it works PERFECTLY for me – in both Sandbox AND Live modes.

    I have had some problems with file names etc – but ALL of these were MY MISTAKE – i.e. not having the correct download path OR mis-spellings. Easily corrected!

    Take care with your “settings.php” editing and ensure that when in Sandbox you have ALL of the correct emails setup (both Buyer AND Seller) and that you are logged into Sandbox Developer before you test – you will not receive a confirmation email from Sandbox unless your Sandbox BUYER email address actually exists!! Also ensure that your Sandbox Accounts are properly enabled and Payment Review is Disabled.

    Sandbox also has a tendency to be “slow” on occasions and therefore the IPN can take more than a few seconds to come through – you may not be able to access the download file immediately from the Thank You Page – but by the time the Buyer confirmation email is received – the Download Link should work. I haven’t had a problem with this “live”.

    Good luck with it all – for a FREE script I think this is fantastic – THANK YOU KIDINO !

  145. Kidino said:

    Thanks Paula.

    Things to look out for …

    - Some web hosting does not allow emails to be sent out where the From is not an email account inside the server. Choose your support email wisely.

    - Make sure you define your variables correctly. Things like extra blanks will cause error because your server will check for something like “ ” while IPN will return “” — that will not match and will cause error.

  146. Mepoet said:

    Thanks for the info. In my case, simple IPN works in the live mode using the original product variables( sample.mp3 and sample.pdf) . Not receiving email from Hostgator was my fault because I did not forward my hostgator email to another outside email address or set up webbased email account.

    BUT simple IPN should also work in test mode because I did not change anything in settings.php from when it works live.
    I should still get correct download links, but instead I get the famous “Purchase does not match product details” error.

    Do you think this error is caused because hostgator had no outside address to forward hostgator email to?

  147. david said:

    is there an ipn notification url i need to put in while using this script. I tried setting this up but am not getting any emails with my download link.

    my knowledge of this stuff is limited. thank you!

  148. Kidino said:

    You do not need to define anything else other than those in the settings.php. As you can see, you link your order button (or link or what ever) directly to ipn.php?buy … ipn.php will generate the Paypal Buy Button and sends it automatically. All URLs and details needed for the Buy Button will be derived from your server info and your settings.php

    No Paypal Notify URL needed to be defined.

  149. Francesco said:

    Hi Kidino,
    have you seen my problem? Is it all ok yes/no…. :)

    The problem is that when the buyer has terminated the transaction and click on button for return to page on my site (the page for ipn return is thankyoupage) I have this message
    :” Invalid Page request2

    What I do. I have done many tests bt the result is the same.

    Thanks for all Kidino

  150. Francesco said:

    Hi Kidino, nly my problem is page return. this is a sample:

    This is te url return after payment the result is
    Invalid Page request

    For me is a url not exact but is all dynamic. Which is the problem?

  151. david said:

    I have tried this multiple times now, following the directions given. I am not getting emails sent to me with the download link. What could I be missing?

  152. Mepoet said:

    @ Kidino and Paula,
    I would like to add my voice to say the script works PERFECTLY. IT DOES !
    At least in ‘live’ mode. paypal_sandbox = 0; // 1 for test more, 0 for production mode

    I tested on AND till I was blue in the face, and test mode did not work once. Just so you know, I was a cgi-perl programmer for 10 years, so following instruction was no problem. I didn’t make any mistakes. I was able to make a sandbox purchase on both servers, but never get a good download link. Kidino was kind enough set SIMPLE IPN up on Hostgator for me. To repeat, it works PERFECTLY…in live mode but not in test mode.

    I went back to hypermart and set up SIMPLE IPN and used ‘live’ mode. It works PERFECTLY.
    This is just my opinion, but I think 99% of those you who followed directions correctly are wasting your time testing in sandbox because no matter what you do, it isn’t going to work after the purchase. You will never get a good download link in test mode.

    If I had simply gone live on hypermart instead of trying to make the test mode work, I could have saved myself a week of aggrivation and about $50, and been selling in 15 minutes. That’s my experience. “Test” it live with a 10 cent product.. A word to the wise GO LIVE ! SIMPLE IPN WORKS PERFECTLY !

    PS, Paypal informed me I can have 3 accounts: a personal account , a Premier account , and a Micropayments account for sales under $12 Paypal takes 5% + $0.05 USD as opposed to 2.9% + $0.30 USD for your standard Premier account..

  153. Francesco said:

    Is there someone?

  154. Francesco said:

    Hi Kidino, only my problem is page return. this is a sample:

    url in paypal for return page is

    after that I’ve bought
    this is the link (the amil arrived and the link is correct) but

    The resukt is after payment is
    Invalid Page request

    For me is a url not exact but is all dynamic. Which is the problem?

    I’ve seen in the page.php this string

    if ($_SERVER['QUERY_STRING'] == ‘thankyou’)

    is not true for me

    infact the procedure go to else


    { die(“Invalid Page Request.”); }
    echo $page_html;

    Help me Thanks

  155. Francesco said:

    help me thanks

  156. Francesco said:


    Finally I’ve resolved.

    I had two problem on button return thankyou page.

    The result was a Invalid Page request or blank page or thankyou page with POST variable blank.

    I’ve set the IPN with url http://mydomain/tpl_tqpage.html

    and removed a PDT url.

    Now is all ok.

    Thanks for all

  157. Kidino said:

    Francesco, changing return_url to tpl_tqpage.html is not a good idea. tpl_tqpage.html is supposed to be a template and not to be used directly.

  158. . o O ( DLGuard – Download page protector, create expiring download links Reviewed: Scam or Serious? ) said:

    [...] may also want to check out: Simple IPN: Free Paypal IPN PHP Script for Digital Download …MasonWorld Late Night Internet Marketing – WordPress Wizard Found a [...]

  159. Francesco said:

    Hi Kidino,
    the name of the page will be tpl_tqpage.html, the name is the same.

    I’ll remove a link for download I’ll restyle a page because for me is only a information and a thankyou page.

    The link for download will be send to email only. Is correct?

    Another page that I change will be a download page.

  160. Mepoet said:

    The DLGUARD is not a scam, but seems to me a serious, major ripoff at $147 and can only be used on two web sites. Thumbs down !!
    There are plenty of similar programs out there but I prefer Simple IPN anyday…because it really is simple.

  161. david said:

    hey Kidino, if you could email me that would be great. I am still having some troubles getting this to work and would love your insight.

    thank you!

  162. Mepoet said:

    FIREFOX trouble.
    Someone downloaded my files but said their Firefox browser does not let them see the file extension and stored the files without an extension. Firefox does not even give them a choice to “save as. This is really bad because they don’t know if they are downloading a pdf or an mp3, etc “. So I inserted this javascript ‘Get browser’ into the
    like this, right here of the tpl_dlpage.html download page to test if they are using Firefox. This works for me:

    hopefully you can see this code instead of it actually checking your browser. CODE:

    if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
    var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
    if (ffversion>=3)
    document.write(“You’re using FF 3.x or above, AND ADD YOUR COMMENTS HERE “)
    else if (ffversion>=2)
    document.write(“You’re using FF 2.x AND ADD YOUR COMMENTS HERE “)
    else if (ffversion>=1)
    document.write(“You’re using FF 1.x AND ADD YOUR COMMENTS HERE “)
    document.write(“AND ADD YOUR COMMENTS HERE “)

    *note, you can delete the last part if you don’t want to make a comment if it is NOT firefox.
    This part
    document.write(“AND ADD YOUR COMMENTS HERE “)

    but make sure you leave the exit from the script

  163. Mepoet said:

    Apparently you can not see the CODE to insert into the tpl_dlpage.html download page head, which is the the words
    in brackets
    and the end word
    which is also in brackets
    nor the words

    script language=”JavaScript type=”text/JavaScript”
    which uses quotation marks and is also in brackets
    nor the end of the script
    which is also in brackets.
    Sorry, I hope I have not confused you.

  164. Mepoet said:

    @ Kidino, sorry to mess up the blog. I didn’t know if I could show actual javascript in it. Maybe you should remove my last three posts so as not to confuse anybody I have also been calling less than sings brackets, yipes !

    Apparently I can also not put javascript in full quotes in this blog .
    it is supposed to be
    less than sign script language= quote JavaScript unquote space type=”text/JavaScript”>
    For some other reason the last part comes out alright. It is only the first ‘less than sign’, and middle ‘quote’ marks that are missing

  165. Jean said:

    I have tried this with a real paypal account (not test mode), and my email is that from the server, but I still receive no emails and when I try to download the file, I see this: “Purchase Details Not Found. Contact Administrator.”

    I have not changed anything other than the paypal and email address, everything else is the exact same as the file, even down to the sample mp3. I cannot understand why this is still not working and I’m getting frustrated. Can someone please help?


  166. Jean said:

    Oh yea,

    I have php 5 and I’m using ixwebhosting for my hosting..linux server

  167. Mepoet said:

    I had the same problem. If I remember it was because I was using the wrong directory. I had put my samples in a different directory and forgot to point to it. I fixed that and everything works.
    I noticed earlier in this blog that Kidino said he originally wrote the script for php5 but changed it to php4. So I reset my host preferences to php 4. But I don’t think that is your problem.
    if you have come to the pulling the hair out stage I will try to help. mg67 – mail at yahoo dot com. That’s a dash. I don’t worry about giving this email out because it is a disposable addy, and easily deleted or replaced if I get spamed or mail bombed.
    @kidino, it’s fine with me if you remove my pervious posts about Firefox so they won’t confuse anybody :-)

  168. Mepoet said:

    grrrr I just can’t seem to post anything well :-) my CORRECT addy is mg67mail-box at yahoo dot com

  169. Pete Clark said:

    It appears to me that in the current download, the customer info file is never created, unless the program is run in Debug Mode.

    In Debug Mode, ipn.php is called as the return file, the file which is called when the buyer clicks on the return button in PayPal, and (if the query string is not “buy”, which it won’t be when coming back from PayPal), then the Customer Info File is created.

    In non-Debug mode, page.php is called, and page.php does not create the Customer Info File.

    It works in Debug Mode, but not in non-debug mode.

    Or have I missed something here? I am short of time, and could be wrong…

  170. Pete Clark said:

    OK, I have it working now, quick fixes, loads of tidying to be done everywhere. This works in non-debug mode, I haven’t tested it in debug mode, as I don’t seem to need it…

    In page.php, I changed the line
    because my development set up puts session data in the GET..

    if (substr($_SERVER['QUERY_STRING'],0,8)==’thankyou’) {

    Then following that…
    //// FROM ipn.php ////////////////////////////////////////////////////////

    // assign posted variables to local variables
    // Check if the Customer Info File already exists…
    if (!file_exists($_POST['txn_id'].’.php’)) {
    // If it doesn’t exist, create it, with the code from ipn.php
    if ($paypal_sandbox == 1) {
    $paypal_url = “”;
    $paypal_ipn_url = “”;
    } else {
    $paypal_url = “”;
    $paypal_ipn_url = “”;

    $item_name = $_POST['item_name'];
    — and all the rest of the code from ipn.php, as far as —
    if ($debug == 1) {
    echo “Debug Mode. Here are IPN data and transaction result.\n”;
    echo “\n”;
    echo $ipn_log;
    echo “\n”;
    and add a } to match the “if file exists” at the top.

  171. Anon said:

    Just in case you haven’t had a thank you in a while.

    Thanks very much, this script was easy to setup and very useful.

  172. Chris said:

    Has anyone come across and solved the email issue? I am using a server email account and still not getting the email message….

  173. Chris said:

    I switch servers and the email functionality is now working….weird…i wish i know how to solve the problem on my regular server. Great script by the way!!!!

  174. Matt said:

    You may just need to restart the email service on the server where it isn’t working. Especially if it is a cPanel host. I’ve had this happen to me with many scripts and in MOST cases restarting the email server solved the problem.

  175. Jeff said:

    I have 3 basic questions, a need for some simplification for those of us non-programmers out here trying to use your script.

    1) I know you can alter the download & thank you pages – do you have to, or will the included dl.php & page.php files work as is without any further alterations?

    2) Which pages from the simple ipn download need to be uploaded to my site (besides the files I intend to sell)? I would think just the settings.php, dl.php, & page.php. Is this correct?

    3) What is the function & use of the ipn.php page? Can you just use a “buy now” button from the paypal site instead? If the ipn.php script is needed, how to you get it to run?

    Thanks a lot, in advance, to all those helpful souls answering. I respectfully salute your advanced technical knowledge!

  176. Kidino said:


    1 – the thank you page and the download page cannot work without the HTML template. So yes, you have to.

    2 – You need to upload all the files except for the README text file.

    3 – Nope. You cannot use your own Buy Now button from Paypal. ipn.php generates that required code for the Buy Now button for you with some extra info like the URL where Paypal can send IPN data, the URL for the return page (aka thank you page) when purchase is done, etc…

  177. foo yinhan said:


  178. Dustin said:

    I’ve been having trouble getting this to work when NOT in sandbox mode. It appears that the problem is with added tax. Something to consider in future versions of the script :)

  179. Dustin said:

    To anyone else who has a similar problem with tax, you can add the following lines of code to ipn.php at the end of the “// assign posted variables to local variables
    ” section (line 66):
    $tax_amount = $_POST['tax'];

    $product_price = $product_price + $tax_amount;

    $product_price = number_format($product_price, 2);

  180. Kidino said:

    Thanks for the code. I may move this to a dedicated website and thinking about open source options…

  181. Trick Cow said:

    Just wanted to say – excellent script! I really appreciate the time you put into your project and your seemingly endless free support.

    I’m not complaining, but I wish there were a simple way to modify it to support multiple products. Maybe I’m missing something but I can only point my PayPal IPN Settings to one(1) ipn.php … therefore I can’t, according to your above instructions, copy simpleipn and just modify the settings. Maybe someone can enlightenment me? :)

    Anyhow, Thank you. The script installed perfectly for me and runs like a charm for one of my digital products.

    ***** 5 Star Script *****


  182. Matt said:

    Trick Cow,

    The script doesn’t currently support multiple products per installation. However, you can simply install the script to another folder to add a new product. Unfortunately, you will have to have a fresh install for each new product (unless of course, you do a package of products) and/or download area.

    This seems to be an issue with even paid versions of paypal ipn scripts. I’ve installed countless scripts that use paypal IPN and the vast majority of them only support one download page and/or subscription fee, etc.

    There are a few out there that support multiple products, but I haven’t found a free one that does yet.

    Good LUCK!


  183. foo yinhan said:

    how to use

  184. Steve K said:

    I am need of some help.

    I cannot make Simple IPN work, in either version (free and paid).
    Regardless of what I’ve tried, and I tried all the suggestions in this ‘forum/blog’, I still get the “Purchase does not match product details” error message. I went as far as changing only the PayPal EMail Address in the settings.php file. I still get the same error message.
    My host is Hostmonster and they’re saying that nothing is wrong with their system.
    I’m not a programmer so please take that into consideration.


    Thanks, Steve

  185. shaedowrose said:

    First I AM thrilled and the ease, simplicity and efficiency of this script and what it accomplishes.

    I was wondering if you still check FB as that is where I first went to contact the author.

    in under 15 minutes I was able to generate the entry side and the exit side in the style of the site I AM producing for my client.

    all I need now is to get the PayPal order to display the download page and I believe it is working and ready for release!

    it probably already has done that, I just need to find where the email was sent in the test!

    Again, Bless you for sharing such a Marvel and let me know how to get you your money and I look forward to a casual correspondence as well!

  186. Kidino said:

    OK, an update with some issues I found with recent users. You want to make sure you are accepting payments with a VERIFIED Paypal account. Otherwise, this could cause Status: Pending and Pending Reason: Unilateral.

    Simple IPN only process orders with Status: Completed. Even if the customer uses e-Check, Paypal will send IPN data again and Simple IPN will process it when it completes and customer will get email again.


    Read the short manual and see how you can customize both Thank You page and Download page by editing the templates. Thank you page template is tpl_tqpage.html and Download page template is tpl_dlpage.html. There are variables that you use to display customer’s purchase info such as transaction ID, customer’s name, etc…

  187. Kidino said:

    I found this and I found it interesting.

    The project creator wants Simple IPN to make download page expire in 6 months. The simplest way to do this is just set $expire_in_hours to 1440. 24 hours multiply by 60 days is 1440 hours. Just change that in settings.php

  188. Kidino said:

    @Pete Clark

    Not sure about your code there. About file not created in Debug mode, that’s not true. Yes, in Debug mode, return url is set to the IPN and not in production mode. But Paypal will still send data for ipn.php to process because we set notify_url to ipn.php.

    In Debug mode, return url is set to the ipn.php and not the thank you page is because to let programmers see what ipn.php is doing and what data Paypal is sending to it.

    And in Debug mode, the script will also dump data into ipnlog.txt for later checking.

  189. Steve K said:

    Tried you suggestion of using verified paypal accounts for testing. Results are still the same. I am still getting the “Purchase does not match product details.” with “payment_status: Pending” and “pending_reason: paymentreview”

    HELP. Still need your expertise.

  190. Steve K said:

    Followup to previous posting:
    If Payment Review is enabled for the seller’s account PayPal will generate the “pending_reason: paymentreview” error. Once disabled Simple IPN appears to work in PayPal’s Sandbox.

    Will do more testing to verify that everything is working.

  191. Steve K said:

    Another followup:
    Switched seller’s email from PayPal Sandbox account to live email account and now I get “pending_reason: unilateral”, which according to PayPal is due to the use of unconfirmed or unverified email account.
    Email account being used is confirmed and verified in both PayPal’s Sandbox and in live PayPal.
    Several websites suggest issue maybe with the script itself.

    Any suggestions?

  192. Paula said:

    Hi Steve K

    It seems strange that you cannot seem to get your setup to work – the script certainly does work as several people here have testified.

    It seems from your earlier post that your Sandbox setup works, so it would then follow that there is something within your live Paypal which is causing the “pending” status. What type of accounts are you using as a) your seller and b) your buyer when testing live? Are both accounts verified?

    If I can help at all – I will try.

  193. shaedowrose said:

    Yes those were both easily set and beautiful

    As yet I have not seen the actual email sent to the customer to ensure it works, how do I get a copy of that going thorugh the sandbox so I can verify it is correct?

    The only email displayed in the sandbox email tray for the test account it set-up is PayPals version, I need to see ours then I can take this live.

  194. Paula said:

    Hi shaedowrose

    For you (the buyer) to receive an email from Paypal Sandbox – that email address must exist and be set up on your site

    e.g. “” – must exist for the email to be received. Anything other than that will bounce, unless you have a catchall account

    Hope that helps

  195. Steve K said:

    Hi Paula,

    Discovered a new wrinkle: Emails are getting to the buyer’s email address with functional links but the buyer is receiving two identical emails about 6 or 7 seconds apart.

    Is this some quirkiness to Sandbox or is this something that needs more attention?

    Also, seller is receiving payment notification emails only within the Sandbox but not to the outside (gmail) address.

    Both emails are live and are outside the Sandbox.

    Any ideas?

    Thanks, Steve

  196. Paula said:

    Hi Steve K

    I am possibly not grasping your comments here, but Sandbox emails are completely separate from any “live” emails i.e. those outside Sandbox, and therefore the two methods of using this script rely on two entirely separate actions.

    One is within Sandbox (with a buyer e.g. & seller e.g. and, of course you must be logged into Sandbox Developer to enable it. These email addresses must exist in your mail program for them to receive the necessary confirmations.

    The Other, entirely separately use, is the Live use of Paypal (with a buyer e.g. & seller e.g. This is what your customer will see when actually buying your product.

    In all – that is FOUR email addresses to cover the TWO separate actions. You cannot mix and match.

    A) Does the script work for you in Sandbox? If not, what are you getting/not getting through and what, if any, error messages do you get?

    B) Does the script work in Live Mode? If not, what are you getting/not getting through and what, if any, error messages do you get?

    Sorry if I am confusing things even more – but by checking each action separately this may help to sort out your problem.

    As I say, I will try to help if I can.

    Money From Traffic Team

  197. Kidino said:

    Double email could only be sent when in debug mode.

  198. Jeff said:

    Still trying to make sense of everything. Wondering about the permission settings. I have all the permisions set for 666, except the test mp3 & pdf, which are set to 644. Is this set correctly?

  199. Fabo said:


    I believed I’ve done everything correct but (In Debug Mode) when I test it out everything works but the download.

    Keep getting this message
    Purchase Details Not Found. Contact Administrator.

    Is it because I’m in Debug mode or what? Please Help

  200. Fred said:

    I have “Invalid Page Request.” once payment is done when redirecting to page.php?thankyouxxxx ???
    Have you got an idea ?

  201. Fred said:

    Pfff.It doesn’t work this stuff !

  202. Fred said:

    OK I can make it work :)
    It works great in fact…I buy the script right now !

  203. Dan said:

    I LOVE this script, it’s gonna save me hours of leg work. One question, you’ll see I set up TWO different iterations of your script:

    - The first sends the buyer the whole album, and that one is working amazing.

    - The second is designed to send the buyer an MP3 bonus track immediately upon purchase, and the other half of the order is a physical autographed CD that I need to send them; BUT, I don’t seem to be receiving shipping addresses on my orders since I installed this script. Any ideas?

  204. Kidino said:

    Dan, the idea with this is for digital products. So I don’t set the shipping address. But if you feel like hacking it, you just need to look into ipn.php and look for the part where it creates the Paypal button codes. You need to have something like

    I think currently it is set to 1, where no shipping is required. If you set it to 0, it’s optional.

  205. Jeff said:

    Still wondering about the permission settings. I have all the permisions set for 666, except the test mp3 & pdf, which are set to 644. Is this set correctly?

  206. Jeff said:

    Still wondering about the permission settings. I am still in the dark if these are set correctly. I have all the permisions set for 666, except the test mp3 & pdf, which are set to 644. Do these have to be set to 777? If so, which ones get reset?

  207. Christopher said:

    Hello Kidino and the rest of the family.
    I’ve been reading all the posts and learning a bunch. I bought the scripts and I’m just new at learning all this. I have programmed in ‘c’ for many years and love it.
    I love the work you have done Kidino and thanks for being so outlandishly patient with all of us. You are amazing. I can’t figure out the html code for the link from my web site to paypal or to the ipn.php. I’ve tried a lot of different things. If I could get some code to link my buy button to whereever it’s suppose to point, i’d be grateful. I used a generated paypal segment. Didn’t work. I used a simple link from my button to the directory where the ipn.php file is located. Don’t think anything made it to paypal. When I bought the code for $10.00 I was given a perfect example of how the code works. I am really excited about the simplicity of this script. Does my heart good. I wouldn’t even mind if others sent me their button code. Paula, you seem to have been able to put it all together. Keep up the good work. Kidino congradulations on the new addition to your family. Thank you for your excitement and good energy. Thanks to everyone in advance. My email address is

  208. Paula said:

    Hi Christopher,

    Thanks for the mention!

    All I did was follow the simple instructions -


    1. Update settings.php with your products info and Paypal details. (EDIT SETTINGS.PHP TO SUIT YOUR PRODUCT)
    2. Upload the files to your chosen directory (ON YOUR WEBSITE)
    3. From your sales page, link your order button to: ipn.php?buy


    Make sure you have a suitable paypal image stored on your site.


    The three stages above are all you will need to get your basic script to work.

    Any other changes are just cosmetic to the “thank you page” and the “download page” – and these are just HTML templates.

    Hope that clarifies things a bit more.

  209. Kidino said:

    From your sales page, you just need to link the button to “ipn.php?buy” … that’s it. If the sales page and Simple IPN is not in the same folder, make sure you add some folder info or just use the full URL… ie

  210. Christopher said:

    Well my dear friends:
    I am getting closer to my goal. I have learned so much today. So far here is what I have learned.
    1. Forget the Sandbox. For me there are just tooooo many variables to play with. Tooo many hours trying to please paypal sand box on email addresses, banks and credit cards …

    2. I discovered that by copying the Kidino files directly into my website directory and made NO changes to the permissions that they all worked fine. I am testing in real time and it’s fun. I dropped the price of my invoicing software to $1.00 and so far it is working great. I think I have 50 cents in my debit card account. It’s been a lot of fun. The emails are coming thru and everything. My only problem is at this point and I’m not asking for help. I’d rather spend the time and figure it out. The links to the download are haywire. Some crazy error. So don’t try to get my software for 1.00 cuz you’ll get ripped off. LOL I’ll let you know when it’s ready and then …..
    Thanks Kidino for such awesome ingenuity. Think about it…no database. I love the simplicity. Exactly what I was looking for. Kudos to Paula. Thanks for your good energy and faith in us. Just simple and straight forward.
    Working in the sandbox bout drove me up the wall though, til I decided that there ain’t no one in the sandbox with any real money so why am I wasting my time here. I’ll figure it out and it was much simpler in the real world…
    More later when my download links deliver.
    All my best and just be patient…it all works out.

  211. Paula said:

    Hi Christopher

    I have to agree with you on Sandbox – it is a developer’s tool, and unless, like us, you are using it for testing lots of other products/developments then it is just not worth setting up for a “one-off”.

    Best to get yourself two separate Paypal accounts and use live testing with those.

    Good luck with your efforts – you will get there – I am sure!!

  212. Christopher said:

    Well, It wasn’t hard to figure out. I am getting my downloads, emails and everything. This is truly cool. Thanks Kidino for your patience and kindness. I had so much fun learning and experimenting. For some reason my server requires that all the files…even the inventory zip files be placed in the same directory as the website. … I tried several different options on the settings.php for pointing the source line to the product when it was in another directory/folder on the server side.
    I tried the whole enchilada … ‘’
    I tried ‘/download/’
    Nothing seemed to work except
    ‘’….and thanks. IT works very smooth. Thank you again.

    Just curious if anyone out there has been able to have their product downloaded from a sub-folder/directory and if so how does the source line read in ‘settings.php’
    All my best and have loads of fun.

  213. Jhonattan said:


    Thank you for this wonderfull script!! it took me weeks to finally find this simple script that i needed, thank you so much, i got everything running smooth, there is only one minor thingy, i hope you can help me! when i download my product, it doesn’t automatically show the extension of the file, is there a way of having all filetypes downloadable with the full filename? like .mp3, .pdf etc..? Payment is going your way.. thank you!

  214. Jhonattan said:

    Hi! it’s me again :) , i solved my problem! for all you other people who get the same problem like i did, the solution is to NOT have blank spaces in your filename.

    So if you have a filename called ‘AlfaBeta.mp3′ and a filename ‘MyEbook.pdf’ don’t describe it like ‘Alfa Beta.mp3′ or ‘My Ebook.pdf’. this script ROCKS!!

  215. don said:

    I am testing the script for a ebook. It seems to be working fine until I click the email link to the download page. When I try to download and open the pdf file my adobe acrobat program opens but I receive an error stating there is an issue with the file (but I can download the file via ftp and it opens-so there is no issue with the file itself).

  216. Kidino said:

    @don Hmm … try uploading the file again, one more time. Or try downloading it again… also check the original source.

    @Jhonattan – hmm … i just simply put ‘../../’ in front of the file name to show that it’s at another folder above the script folder.

  217. Don said:

    I tried the ‘../../’ and that did not work I tried doing a simple .jpg download and that didn’t work. Here is what I received when I tried opening the pdf:

    Adobe Reader could not open sample.pdf because it is either not a supported file type or because the file has been damaged (for example, it was sent in an email attachment and wasn’t correctly coded).

    I have included the link to the download page so you can see for yourself. Maybe it is just an issue with my system.

  218. Kidino said:

    This could be the place where you got things confused. There are two places where you need to set the file name. One is the “filename” and the other is “source”.

    Filename is the name of the file that your customers will be downloading.

    Specifying the filename, you don’t need the location… hence, no need for “../../” or anything like that. Just the filename.

    Source is the actual source of the file, where the script will take its content and deliver it to your customers. You have to point this to an actual file that exists in your server.

    If you get confused about this, watch the video again, fullscreen and in HD.

  219. Kidino said:

    By the way, I am just so grateful that we’ve had over 2200 downloads since Aug ’09. I may just spin this off into a website of its own and release this as LGPL.

    Feeling really great seeing all the websites using my script. Found near 100 websites so far…

  220. Don said:

    I watched the video again and I’m not following something I guess.

    Here is what I have in the setting.php file:

    $product_files = array(
    ‘name’ => ‘Party Thru College’, ‘filename’ => ‘sample1.pdf’, ‘source’ => ‘sample1.pdf’

    This works. But suppose I want to place the file in a folder one up on the order page here for example:

    what should I set source to?

  221. Kidino said:

    $product_files = array(
    ‘name’ => ‘Party Thru College’,
    ‘filename’ => ’sample1.pdf’,
    ’source’ => ’../path/to/other/folder/sample1.pdf’

  222. SeoPadawan said:

    Hey Kidino,

    I’ve come across a lot of cool php scripts and yours is definitely in the top 5 :)

    Thanks for sharing with us.

    Jamal aka SeoPadawan

  223. Kidino said:

    Thanks Jamal.

  224. Alastair said:

    Hi Iszuddin,

    Script seems very cool. Two questions – would you consider adding facily for unique licence key delivery (a simple text database would be sufficient)? Secondly, if not, could we modify the script to add such functionality? What software licence are you releasing this under?


  225. Kidino said:

    I didn’t really research much about open source license when I did this. but now that I have, I officially announcing this .. this is released under MIT License.

    Alaistair, so far I don’t have plans to develop that feature. but if you want to sponsor it, I could spend some time. but you have to agree that the codes will also be released under MIT License.

  226. jony said:

    first thanks for the script but this script was bad news for me i having problems with the email i dont know what the problem is it just the script stop sending email and even after i reupload the new file it is not working i try to fix that for full day and no luck also i tried to make it to send email for me to and no luck it stop sending email for some reason so there is problem with the email beside that the script is good

  227. Lee said:

    Hey Kidino,

    I am wanting to implement the feature almost exactly as Alastair described. I have a table structure as well as a function to generate unique keys already to go. I just need to find time to pair the two together.

    So rather than me spending time to develop that functionality I would like to sponsor you to develop it. Could you get in touch with me to discuss details?

    Thanks Kidino,


  228. [WTB] help with Paypal ipn digital download script « The Digital Point said:

    [...] [WTB] help with Paypal ipn digital download script hey i need help i bought this script [...]

  229. [WTB] help with Paypal ipn digital download script « The Digital Point said:

    [...] [WTB] help with Paypal ipn digital download script hey i need help i bought this script [...]

  230. foo yin han said:

    i dont understand how to use

  231. John said:

    has anyone got this to work with alertpay?
    First time I have ever looked in to something like this and could use a little help in setting up…

  232. Jon said:

    I’d like to reiterate what Paula stated above. While in the sandbox, log into both buyer and seller account. Doing this and making sure my settings.php reflected the paypal seller TEST account, it worked fine in dev. Even the email was correctly sent out. By logging into both accounts I had ZERO problems. Before I set the correct paypal seller test account – I was also receiving the infamous “purchase details” error message. I have NOT set CHMOD 777 and I’m using hostgator.

    Thank you so much for making this script available. I’ll be making a donation after my first sale :-)

  233. Greg Ponchak said:

    I know pretty much all of the comments have been about getting this script to work and the “purchase details” error, but I’ve read through it all and cannot get it working for the life of me. I’ve checked the settings.php file over and over, i’ve tried changing the file permissions, still…I keep getting that error.

    If you could email me and help me out, that would be great. I’d be happy to pay the licensing fee.


  234. Abdul said:

    Thanks for the script but why does it take me to paypal sandbox?? when i enter the url

  235. Kidino said:

    @Abdul – check the settings.php and toggle for testing/sandbox off

    @Greg – I can’t right now because I have a lot at hand. But perhap some previous users can help Greg here. Maybe Greg needs a manual installation help…

    BTW Greg, what hosting are you on right now. WIndows/Linux. I haven’t test this on Windows hosting.

  236. Greg Ponchak said:

    I completely understand. It is quite alright. It would be great if someone else could help though!

    I am on Bluehost which I’m 99% sure is Linux.

  237. Dainis W. Michel said:

    If I have to put the PDF file on my server at let’s say, does this script allow me to keep folks from accessing that link directly?


  238. Paula said:


    The file – as you have it – will still be accessible directly, however that direct link never appears as part of the scripts actions. It is not revealed at any time.

    By naming the actual file something obscure and having a blank index.htm file in your /downloads directory to stop people viewing the files in there – will make it virtually impossible for anyone to “guess” the proper location of your download.

    Remember you can use a more memorable name that your customer will see in “name” and “filename” and use a hard-to-guess name for “source”

    Hope that makes sense.


  239. Paula said:

    Hi Greg

    Are you getting that error using Paypal Sandbox or Live Paypal (or even both)?

    I will try to help if I can – no promises!!

  240. Greg Ponchak said:


    That would be great if you could help :) .

    I have just tried in Paypal Sandbox as I don’t really have much money to spend by trying it on live Paypal. Should I try this somehow?

  241. Gabi said:

    Hello, nice script but I have the same error as Francesco: Invalid Page Request. after paypal redirects to my page.
    I did not find a solution in the coments area.
    I want to buy it but I want it to work.

    Thank you

  242. Kidino said:


    I added shipping option in the settings. There’s a new variable where you can set get_shipping_address. 1 – yes, 0 – no, 2 – optional. You will see the result in your Paypal transaction. The shipping details aren’t save into the transaction file though…

  243. Ghillie Suits said:

    This is a great script. Thanks for sharing. I’m also getting a Download file ID 0 is not valid error. I’ll go through the comments and see if there is any solution?

  244. Scottsdale Personal Trainer said:

    Thank you for this program, I was trying to figure out how to sell my training ebooks on my site and this is exactly what I needed!!! You rock!!!

  245. Mariano said:

    Hello, First of all congratulations on your awesome script!
    Im trying to set it up for a test to download different files.
    But I have different items setup in paypal, and in the script there’s place for only one paypal item (line 14 of the script), how should I add more papyal items? there’s place for adding more files and filenames, but not different paypal items (with different paypal codes).
    Your help with this matter will be super appreciated.
    Thank you very much!

  246. Kidino said:

    @Mariano – the Paypal Item can be anything. Normally being used as product # or model # or anything like that. Just to help you with referring back to the product… just put in anything you feel suitable.

  247. Aperio said:

    @Mepoet — hope you still check in here from time to time, because your post gave me the solution. I was having that same problem as so many others in receiving the “Purchase Details Not Found” error message. It was an error on my part and NOT the script in regards to the sandbox developer seller and purchaser emails… I suspect this may be a problem for many of the others as well.

    So a quick recap for anyone else getting that message and you have already checked folder permissions and you are sure everything else is set correctly (i.e. file paths, lowercase for emails, etc).

    * Create a sandbox acct with an email other than your normal email address.

    * Create a test seller account and a test buyer account

    * When in test mode, plug in the sandbox seller account into settings.php and make your test purchase using the test purchaser account you created.

    Bada bing!

    @Kidino.. you are awesome sauce for this script!

  248. Sascha Junnek said:
  249. Kidino said:

    Thanks Sascha for highlighting this. With regards to that problem, it has been fixed. You can download the new version now.


  250. mepoet said:

    should those of us running an older version install only the dl.php …. or reinstall the entire Simple IPN script?

  251. Kidino said:

    OK … sorry. maybe I should be more clear.

    The files that you need to change are

    - dl.php
    - page.php

    Download the new one and replace those two

  252. Marius said:

    Hey guys!

    In test/sandbox mode should the script send the emails with the sample attachments to the test client email address? Because, from what I’ve noticed, nothing happens… And I’m getting that popular error… Purchase Details Not Found. Contact Administrator stuff.

    What i’ve done:
    - the folder was uploaded to the server and it has 777 attributes.
    - the e-mail addresses were both real ones and preconfigured by the sandbox but nothing got to them (not from the script at least)
    - i’ve edited the settings.php file and set the $paypal_email_address to the one I used to set up the test account.

    Am I missing something here?

    This seems to be a great script. If it would only work…


  253. Aperio said:

    @marius – not to buttinski with your question here.. but i fought long and hard before finally getting everything to work. Some things to double check..

    1. Make sure both the buyer and seller accounts are ones you’ve set up in the sandbox – not actual paypal accounts. The seller sandbox acct is the one put into settings.php and the buyer sandbox account is the one you will use when you do the test purchase.

    2. Make sure those accounts are set up as verified accounts and have payment review disabled (the payment review was an unknown stumbling block for me for a while).

    3. The emails get sent to your actual developer login i believe.

    4. Make sure you are actualy logged into the sandbox site when you run the tests.

    Not sure if any of those points may fix your troubles, but worth a shot to outline them just in case.

  254. Marius said:

    @Aperio thanks for the response!

    Ok, so I’ve checked the things you told me to check and the only thing that wasn’t already there was the payment review disabled wich in my case was actually enabled.
    Unfortunetly, that didn’t have any effect whatsoever…
    The only thing I have left to do it to go blind as Mepoet suggests here and give it a go live on my website. I hope I won’t have too many complaints.
    Keep your fingers crossed :)

  255. Marius said:

    Ok, so I’ve done what I said. I’ve gone blind and uploaded the script to my website. Apparently it works, there is no more urchase Details Not Found. Contact Administrator. Thank God!

    So here’s an advice to all of you that are still testing in Sanbox: DON’T! Just install it.

    But in my case there is a problem: it’s not sending any e-mails.
    Any advice on that ?


  256. MarkMan said:

    Ola, what’s up amigos? :)
    In first steps it’s very nice if someone supports you, so hope to meet friendly and helpful people here. Let me know if I can help you.
    Thanks in advance and good luck! :)

  257. Silvershot said:

    Im currently making a new website that hosts peoples files for them and allows them to collect the money without any interference from me. Im currently in the testing stages at the moment.

    This script works like a charm *AFTER* setting the folder permissions to 777! its easy!

    Also, dont bother with the thankyou page details, PayPal cant clear it fast enough and the details are never created. The best thing to do is to just make a thank you page that states that there is an email on the way.

    Thanks so so much, im gonna give you a big shout out on the site and a like to this page when i get it all sorted!


  258. Kidino said:

    With regards to the thank you page, you can always change it by changing the thank page template

  259. Silvershot said:

    Ok, for some reason its just stopped working and now i get this error:

    No web page was found for the web address: http://website/folder/folder/dl.php?id=3WR854951M139400P&file=0

    the file size is 72mb, does that have anything to do with it?

    Im frustrated cuz its worked once, then never worked again!

    please help me :(

  260. Silvershot said:

    I just tried changing the download source to:




    both return:

    Download file ID 0 is not valid. Please contact webmaster.

    I cant see what is wrong and its very annoying to see that other people have got it working with ease.

    Heres my settings.php

    ‘’, // normal name of the file
    ‘filename’ => ‘’, // filename the customer will gets
    ‘source’ =>’ // actual location of the file
    // does not need to be the same filename
    // location can elsewhere too like:
    // ‘source’ => ‘../../store/sample.mp3′

    //$product_files[] = array( DEFINE ANOTHER PRODUCT
    // ‘name’ => ‘Sample PDF eBook’,
    // ‘filename’ => ‘workbook.pdf’,
    // ‘source’ => ‘sample.pdf’
    // );

    $email_subject = ‘Your Purchase: {PRODUCT NAME} ({PRODUCT CODE})’; // subject line for your email

    // email body. you cannot have anything, even blank spaces after EOT

    $email_body = <<

  261. Silvershot said:

    if i type in the in the URL bar, it will download it with the ID in the URL bar, somewhere it isnt making the link to the file :(

  262. Silvershot said:

    Is no1 available for help :(

    Ive tried everything, multiple times :’(

  263. Kidino said:

    @Silvershot, I am sure you received my email

  264. Dayseeker said:

    Hi,Kidino, i have the same problem as Silvershot , could you help me out?

  265. Frikdel said:

    Does someone fixed the Download file ID 0 error ?
    Please help

  266. Shawn said:

    Would there be an easy way to mod this so that the end purchased file is attached to the confirmation email sent to the buyer…rather than giving a link to a page?

  267. Kidino said:

    NOTE: I just found out that there must’ve been some changes in Paypal. Your thank you page will not work if you have Auto Return turned on in your Paypal profile.

  268. Kidino said:

    @Shawn – file attachment, you may need to edit functions.php yourself. There’s a function called send_customer_email. Can’t really help you with this but this URL may help.

  269. Kidino said:

    @Frikdel – you need to make sure that the source for your file is correct.

  270. mepoet said:

    I have examined my paypal profile but I can’t find a reference to “Auto Return turned on in your Paypal profile”
    Under what heading in the paypal profile is it?

  271. admin said:
  272. mepoet said:

    Auto return. Thanks for the heads up.
    As usual Paypal has not given the complete instructions. The incomplete instructions say to log in, click the Profile subtab under My Account, then click Website Payment Preferences link under Selling Preferences.
    For those who follow instruction literally the problem is, you won’t see Selling Preferences under the Profile subtab.You will see “more options”. Click “more options” and then you will see Website Payment Preferences.

  273. David said:


    I am testing the script but it returns the following after clicking the pay link – Any help here? Thank you!

    What follows is the complete page output with error messages (in view source mode)

    Notice: Undefined variable: debug in \\NAS43ENT\domains\t\\user\htdocs\commerce\pages\html\ipn.php on line 23

    Notice: Undefined variable: debug in \\NAS43ENT\domains\t\\user\htdocs\commerce\pages\html\ipn.php on line 39

    Notice: Undefined variable: debug in \\NAS43ENT\domains\t\\user\htdocs\commerce\pages\html\ipn.php on line 47


    Notice: Undefined variable: debug in \\NAS43ENT\domains\t\\user\htdocs\commerce\pages\html\ipn.php on line 56
    Please wait while we transfer you to Paypal.

  274. Harry said:

    Hi! Great job on the script. It worked instantly live (never tried the Sandbox). I have one issue even PayPal cant identify.
    No matter how I set up the script, or my account the order says it will be shipped too, but also “Return to Merchant” works just fine.
    ($get_shipping_address = 0; // whether to get or not shipping address
    // 1 – Yes, MUST enter shipping address
    // 0 – No, shipping address field removed
    // 2 – Optional, shipping address is optional
    I have a Premier account, and set the IPN listener to their respective URLs with support and contact e-mail and I just can’t get rid of the shipping address and its not obvious in Options .Everything else works perfectly.
    Any idea what I missed?
    BTW – all of your user comments were so helpful and well written.

  275. Kidino said:

    @Harry, I will look into that.

  276. Harry said:

    Thanks Kidino, I did not see that on your own IPN when I bought the first open IPN product from your link. It’s a wonderful product. and It must be somthing I missed but all esle is fine.
    I am buying a second IPN for a another Website, as that is the right thing to do (for me anyway).
    Please let me know what you find, and if anyone sees my note here – have you seen this?
    Best to all here.

  277. Frank Clarke said:

    8 March 2010 – I found that the Thank You Page would now work if you have Auto Return turned on in your Paypal Profile.

    “now” should be “not”. This fixes the “Invalid Page request” problem.

    I have been banging my head on on the wall for three days, and this script saved me.

    It works on my machine, thank you!

  278. Kidino said:


  279. TXCHLInstructor said:

    I basically did my own paypal interface to my website for my classes (a kludge, but it did simplify things a little). I finally bought a PHP script from some outfit in WA, which doesn’t appear to be in business, and I got another programmer to help me with getting it installed — but the fact that there is no support from the company, and I don’t appear to have *all* of the source code is making things a bit difficult.

    Fortunately, I did not pay a whole lot. And since I’m a programmer myself, I don’t really have any excuse for not doing all of this myself (except that time is a finite resource which I seem to have trouble managing). I got your simple IPN primarily to study it, and I’ve been following along with the various comments on it.

    I would definitely be interested in learning about something even simpler than your Simple IPN.

  280. Kidino said:

    Here’s how I am going to make Simple IPN a whole lot simpler:

    - don’t have to do MySQL setup
    - don’t have to upload any scripts
    - don’t have to worry about file permissions
    - don’t have to do FTP’ing for your product files
    - don’t have to create expiring download links yourself
    - don’t have to worry about Paypal button setup
    - don’t have to know PHP, ASP, CGI, Perl, CFM
    - don’t have to know HTML if you don’t to
    - don’t have get a web hosting to install it on
    - nothing to install
    … only to upload and sell…

  281. Kidino said:

    Oh yeah… of course, like Simple IPN it’s also free…

  282. Paula said:

    Hi Kidino

    As soon as you mentioned the word “FREE” – I’m all for it ;-)

    Look forward to hearing more . . .

    All the best

  283. Kidino said:


    Have you checked out — also from me.

  284. Lucas.W said:


    I have tested simple ipn – it is great! but when I click the link after a purchase I get this:

    ” Purchase Details Not Found. Contact Administrator. ”

    I have not altered the code, only the PayPal email etc. but not the product, can someone please explain why I might get this?


  285. Kidino said:

    @Lucas, that means for some reason it’s not creating the PHP data file for the customer’s purchase. Check if the script has enough permission to create a file.

  286. Lucas.W said:

    Hello again,

    Can you please tell me how to check if the script has enough permission to create a file?

    And also if it does not how and what should I change it to.


  287. Lucas.W said:

    Hello again,

    I would like to know something, just like the Product Price ‘grabs’ the information from one .php file and then inserts it into the final ‘tpl_tqpage.html’ – how can I add another field just like the item number, but it is called something different for example “Identification Number” – I understand this would be redundant data, but it is important to my checkout.

    Can someone please tell me the files I need to edit to make this work.

    Thanks, Lucas.W

  288. Lucas.W said:


    I am sorry to keep posting, but I wanted to further clarify, for example the field called “Cost” I want this exact field called “Identification” although it has nothing to do with PayPal, it just takes it from the ipn.php to the “tpl_tqpage.html” – I believe.

    How can I do this, and please not I must have it like this, I can’t just edit the ‘template’ file because that would not work for my exact desires.


    Thank again,

  289. Lucas.W said:

    @Kidino, I have changed the permissions to web visible and web writable, but still no luck, I still get:

    ” Purchase Details Not Found. Contact Administrator. ”

    Any other solutions? Anyone?

    Note that I am using ’0′ “production mode” and I have correctly linked my email. I have pretty well tried everything mentioned above, and still no luck.

    Hope someone can help, Lucas.W

  290. Lucas.W said:

    @Kidino, I have changed the permissions to web visible and web writable, but still no luck, I still get:

    ” Purchase Details Not Found. Contact Administrator. ”

    Any other solutions? Anyone?

    Note that I am using ’0′ “production mode” and I have correctly linked my email. I have pretty well tried everything mentioned above, and still no luck.

    Hope someone can help, Lucas.W

  291. Kidino said:

    have you tried

  292. Lucas.W said:


    Yes, I have looked at it, but I like simple ipn. Its much more flexible to work with and to customise.

    I do appreciate UPLOADnSELL – but I personally like simple ipn more, at this point in time – although the Pro account might be interesting.

    Does any one have any solutions as to why I am still getting this ” Purchase Details Not Found. Contact Administrator. ”


  293. Paula said:


    Regarding your “Purchase details not found….” – in live mode, are you using an entirely different email address for the purchase? Is that purchase showing up in your Paypal Account Admin?

    Is your seller’s email receiving the payments? Is that showing in the relevant Paypal admin?

    Are either of the email addresses set to manually accept payments?

    Does the confirmation email show the download link – and does that link produce “Purchase Details…”?

    Sorry for all the questions! Trying to help.


  294. Katt said:

    If I can get this to work I’ll gladly send you the 10 dollars, but here’s my problem: I already sell physical cds on my website so I have two different shipping methods set up in my paypal account. How do I tell paypal that the items I’m selling with your script have no shipping charge?

  295. Dainis W. Michel said:

    Hi, I run and, and I’d like to stop using payloadz. I need to preserve my tech-brain and would love to pay you for some time on skype to configure simple-ipn with me so I can deliver my products.

    Sorry, I don’t want to use a hosted solution like upload and sell.

    Can you get in touch with me, let me know your rate, and set up a time for a tech call to get things configured?


  296. Lucas.W said:

    @Paula, Hello thank you for your help, Yes the purchase is showing up in my PayPal account, and is correctly sending the PayPal email receipt for both myself the seller, and buyer.

    As for “manually setup” emails? I am not entirely sure what you mean, but if I understand correctly yes, I can get money directly through my email, through a manual transaction.

    No, the email does not show the download link and “Purchase details…”.

    I am really lost as to why this is, thanks for your help.

    Any more advice, or solutions?

  297. Katt said:

    I figured out how to set the shipping charge to 0 in the ipn.php file, then got the “Download file ID 0 is not valid. Please contact webmaster.” error, so I checked file permissions and they were set to 755. Changed permissions to 777 and my host doesn’t allow this! Is there any way to make this work with 755?

  298. Kidino said:

    @Kat – Since SimpleIPN is created for downloadable products, it does not take shipping charge.

    @Dainis – will be emailing you soon…

  299. Katt said:

    Thanks Kidino, I figured out the shipping part, but now I can’t get past the file permissions problem. Using siteground, and they don’t allow anything above 755. Is there a possible workaround for this without using a database?

  300. How To Sell Your eBooks, Files, Downloads with Paypal using -- said:

    [...] a class on how to sell digital products online and how to set it up with Paypal. So I released SimpleIPN back in August 2009. And I thought it was already the simplest way to integrate your ebook with Paypal, while [...]

  301. Lucas.W said:


    I just wanted to know know how do I change the Purchase date & Time.

    It is currently in PDT time.

    Any help. Thanks,

  302. Rafael said:


    I am really interested in using your script but with google checkout. Paypal are just too much of scammers. You think you could integrate it into your script? Let me know, I would definately be willing to pay for a script that is.



  303. Mike said:

    Was having some trouble with the emails not sending. Did some research in the logs and found that the fifth parameter (mailParams) in the mail() function (functions.php – line 89) was causing an error due to PHP safe_mode being enabled on the hosting account (Linux/Qmail). Removed the fifth parameter and emails started working.

  304. Leanne said:

    Best script ever! Just started using this script today, read over the whole blog first so I got a feel for the problems people were having. At first I didn’t believe that the only thing you need to change is the settings.php but it’s true! Had two problems:
    “Purchase Details Not Found” – so I put all the files into a 777 folder, then I got the
    “Download file ID 0 is not valid” – but I had the wrong download file name in the settings.php…..
    And hey presto! With these two fixes, it’s sorted! Thanks so much, it’s seriously taken the pressure off for my final year project (which is due in a few days!!).
    Thanks again, you’re a legend!

  305. Leanne said:

    Hey is anyone else having trouble with the ipn today!? I just tried to execute the paypal function and it said “Invalid Page Request” when I clicked on the button on my download page. I assume it’s referring to the “Please wait while we transfer you to Paypal” page!?

  306. Dave said:

    Well I have played for ages with this script and the current host doesn’t allow changes to permissions, 755 should be fine anyway!

    I get the same error as evryone else seems to be getting.

    Purchase Details Not Found. Contact Administrator

    Very very frustrating :(


  307. Dave said:

    Well a little update :)

    I moved the site to another hosting company I use and it works. So I would suggest that if you are having issues like mine then look for another hosting company.

    I noticed when I originally downloaded the files that it was qouted as being altered to work with PHP4. Again I would suggest a new hosting company if they are still using PHP4, it has long gone…… PHP5 is the order of the day for any respectable hosting company


  308. jack parler said:

    I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the great work Look forward to reading more from you in the future.

  309. Carmene said:

    Am very interested in your script, it looks awesome.

    Is there anyway that this can support the shopping cart feature of paypal?

    Thanks in advance.

  310. Bill said:

    Has anyone ever figured out the “Invalid Page Request.” fiasco? I’m getting it any cannot get around it.

    It occurs when your customer pays for their product and is forwarded to the “thank you” page.

  311. Matbot said:

    Do you have to activate the INSTANT PAYMENT NOTIFICATION (IPN) in the PAYPAL account itself? And if so, which URL do you hate to enter?

    Thanks for any help!

  312. Fabien said:

    @Bill: Your product source URL might be wrong. Works all fine for me.

  313. SOliduS said:

    having problems with the login information email not being sent to my test accounts using sandbox

  314. SOliduS said:

    also getting purchase details not found as well. Do i need to set permissions for .ipn.php to 777?

  315. SOliduS said:

    just found out my host does not allow any 777 folder permissions. would this be a problem?

  316. John said:


    I installed this script and everything works great EXCEPT when customer clicks on download link gets this error:

    Download file ID 0 is not valid. Please contact webmaster.

    I had 3 products in the array, so this message is also what you get on the other download links as well just ID 1 and ID 2 instead of ID 0

    When I checked everything, I found one error…..I left variables for more than one of the download styles on the tpl_dlpage.html

    Is this likely what caused the error? Or should I be looking at something else? Thanks!

  317. John said:

    Oh one other thing I found was file locations appeared to be wrong….

    I have script in root of folder…..and then have download folder…

    in my settings I had path to download folder as:


    when in fact it should have been:


    So would this be it or would it be having the more than one download variables listed on tpl_dlpage.html??

    (download location was wrong either way)

  318. John said:

    Figured it out……was caused by incorrect path to download…..

  319. sam said:

    I sell numerous old books/magazines online. What would you suggest for selling with Paypal? These are mostly each unique items. I have details in a csv file of each item and want to populate web pages. Another option is for google docs to be used as the database where I can modify as items are sold. Have looked at what Google Checkout has as a widget but it’s not flexible enough. Would like something like that (a widget) that works well with Paypal.

  320. John said:

    I would suggest visiting the Paypal developers forum. (search that on Google to find).

    If there is not something already available as a stand alone, there are those that could advise how to do it or may do it for you for a nominal fee.

  321. Waste of Time said:

    This script is a total waste of time, never have I had this much trouble with a .php script.

    Spent two days on it already. Have the same errors of the above and more.

    “Purchase Details Not Found. Contact Administrator” & “Download file ID 0 is not valid”

    I could be wrong though, so I’ll pay anyone who has some real php experience $100 over the next 24hours to spend the 30 minutes it should take to actually get this working.

    Need to host my own script, the “Upload’n Sell is not an option”


  322. John said:

    Contact me….I can get it working for you quickly


  323. Paula said:

    “Waste of Time” – this FREE script is NOT a total waste of time and WORKS PERFECTLY – if you follow the SIMPLE instructions.


    The errors you are seeing relate to YOU having the wrong paths, download details etc – something the script has no control over.

    If you are willing to spend $100 on a FREE script, why not buy a commercial script with proper paid support so that they can “hold your hand”.

    It appears as though you may need that type of assistance, whatever the script.

    Good luck in whatever you choose!


  324. Kidino said:

    Paula, I logged in today and found “this”. I have to say that your reply is classy…

  325. mepoet said:

    I wonder why the $100 wasn’t offered to Kidino. He would have probably set you up. Once you see it in action its so simple you can set it up yourself over and over. its worth it.
    Thanks Kidino.

  326. John said:

    Geez….give the guy a break. I am sure the $100 was more a satirical suggestion of frustration more than an actual offer….this guy just needed help………

  327. FFMG said:

    Does this still work with php5?

  328. John said:

    Works fine with PHP 5 latest version…..

  329. Jeremy said:

    Thanks for the script. But unfortunately for me it isn’t usable, because it doesn’t send out an email to the customer.
    I’m running PHP5, but it doesn’t seem to work. Also I tried chmodding the files to 777, but it has no effect. I’ve tried it in safe mode and in live mode…

  330. John Farrar said:

    I am running PHP 5 as well and the script sends out emails just fine….so sounds like you have something not quite right in the setup…..

  331. Kidino said:

    When it comes to email problems, it could be your web hosting. Sometimes web hosting has certain restrictions on scripts call the mail() function… try asking your web hosting.

  332. Jeremy said:

    Thanks Kidino and John for your replies. It seems my hosting provider has some variables I can switch on or off by using htaccess. Like the variables “register_globals”, “magic quotes”, php4 /php5. I’m going to try different settings, and let you know if I succeed.

  333. Dave said:


    register_globals should be off and yourt host shpould really be running php5, 4 is long gone!!

    Dave :-)

  334. Jeremy said:

    I still have no luck with the script. I tried several settings and I use verified accounts for seller and buyer in the Sandbox. Probably I’m overlooking something.
    In the Sandbox I get messages from Paypal, but not the actual download link.
    Your new website Uploadnsell looks promising. Problem is that I have one file of 48 mb, which is over the limit.

  335. John Farrar said:

    Jeremy, if you want, I can take a look and try to help you get the simple IPN setup…if interested email me admin[at] (no charge of course)


  336. fred said:

    I have this error message : Purchase Details Not Found. Contact Administrator.
    I’m in Justhost server and I can’t chmod the ipn folder as 777, I think that’s the problem…If I do it I have a 500 internal error…what to do ?

  337. Kidino said:

    Try 666, can you do that? or 755

  338. Aperio said:

    I have installed this for a client before on justhost and if memory serves me correctly, I believe 755 were the correct permissions for this.

  339. Jeremy said:

    The script is finally working on my site. The problem had something to do with blocked PHP commands to external URLs. This was set by my hosting provider for security reasons. Now they have unblocked it and the script is working!

  340. Jerseys said:

    hey,you have posted such a effectful article that it will certainly help me.

  341. Hostgator Review said:

    This post was good to read, very helpful. Thanks.

  342. Mike said:

    I have the script working perfectly…but for some reason for certain paypal addresses it does not send an email with the dl link from my server…only a standard useless paypal notification. I do see php download files being created so I dont know what the problem is. Thanks

  343. Don Robberson said:

    LOL – I had to read it a bunch of times, but your post finally made sense :o )

  344. Lee said:

    Hey “Cheap NFL Jerseys” and any other spammer.

    Take 10 seconds and check the source of the page, you will see that rel=”nofollow” is appended to all links.

    Save yourself time and others having to deal with your lame loser like behavior and post elsewhere.


    Sorry Kidino but I had to say something.


  345. lmc said:

    Erm dosent take a braniac to remove the advertisements. Thanks for the script though, going to donate soon…

  346. Kidino said:

    @Imc, of course. It’s a simple script.

  347. lmc said:

    I want to make the script insert a user in to a database after payment, and then not allow the user to refresh the page so it inserts another user (if you get me). I know alot of code can be scrapped like download limits and stuff

  348. Mike said:

    This script is what I need but I can’t make it work properly. I get taken to Paypal, make the payment OK and get the download email with a working download link. But instead of the thankyou page I get an error message ‘Invalid Page Request’. I’ve tried turning Auto-Return on and off but it makes no difference.

    What might be going wrong?

  349. admin said:

    It could be that the script failed to write the transaction data to the folder. Try setting the folder to permission 666…

  350. Steve said:

    Please help. I can’t figure out how to get past the message ‘Purchase Details Not Found. Contact Administrator.’

    I have set CHMOD to 777 on the directory, but nothing is being written, and no email is being sent. Have you sorted out this issue yet?

  351. Mike said:

    I’m not even sure I’ve set it up in Paypal correctly. Can you confirm:

    the notification URL points to ipn.php
    auto-return is on
    the return URL points to ipn.php
    payment data transfer is on

    With that setup the payment works and I get the email with a download link but when I click it I get the same as Steve.
    Also I don’t see the thankyou page. So I’m assuming I’ve set it up wrong. So how should I do it?

  352. Kidino said:

    @Steve, I found out that in your case, you are using an email that you have not registered in Paypal or that email is not yet confirmed in Paypal. Use email address that you registered and have confirmed in Paypal or the verification will fail.

  353. Harmon Adan said:

    Information like what you described here is going to be very useful to me. I will post a link to this post on my blog. I am sure my visitors will find that extremely helpful.

  354. Alberto said:

    is it possible to implement this scripti but using the “donation” with fixed amount payement method instead of “normal payment”?

  355. Kidino said:

    Sorry Alberto, Simple IPN only uses the Paypal’s Buy Now button.

  356. Amanda said:

    So I tried to buy the paid version to see it in action and got “Purchase Details Not Found. Contact Administrator.”. I couldn’t find a contact address to ask for a refund?

  357. Kidino said:

    Hello Amanda, I see that the system processed your purchase fine. Maybe Paypal IPN was delayed a little bit. But the system should have sent you an email when it received the IPN data.

    Anyway, I also sent you an email with your download link. But if you want a refund, just write back to that email. I understand.

  358. Amanda said:

    It took a bit for the transaction to go through I guess I tired again just now and it let me download. Thanks for the quick answer!

  359. Sloba said:

    Hi, great script but like other cunt work on procesing download page.

    Hmm i just wonder if you can give me script that make original file url invisible, also if it is time experied ( if you can add that ).

    I am not deep in php.

    I will delete download link redirect in TQ page, and payer will resive mail with link ( this script, i need to give him file with url mask and time expired . )


    if you coud, that will be great thnx!!

  360. Shaun said:

    Having problem with “Download file ID 0 is not valid. Please contact webmaster.” after download is clickef. It worked fine, but 2 day’s later all of a sudden gave above error. HELP PLS

  361. Marissy said:

    Hi, I’m having the same issue as Shaun “Download file ID 0 is not valid. Please contact webmaster.” Does anyone have any advice? TIA.

  362. Kieran said:

    Having same issue as Shaun & Marissy…

    “Download file ID 0 is not valid. Please contact webmaster.”

    Any help?

  363. Kieran said:

    Anyone know how to set it up so the linked file can only be downloaded ONCE rather than have a time expiry (i.e. 72 hours)???

  364. Kieran said:

    So… are you going to suggest a possible solution to the…
    “Download file ID 0 is not valid. Please contact webmaster”… problem? Many people are having this problem so please give at least a little bit of direction!???

  365. Kieran said:

    “Download file ID 0 is not valid. Please contact webmaster.” ?????

  366. Kieran said:

    “Download file ID 0 is not valid. Please contact webmaster.”


  367. Kieran said:

    Troubleshooting… troubleshooting… troubleshooting… and I think I fixed it! Yay!

  368. Rafael said:


    I seem to have tried everything. The script generates the xxxx.php files. The email is being sent with the correct download information. But I still cant get the thank you page to work. The “return to merchant” links to /page.php?thankyou which has no customer detail and includes a download link forwarding to /page.php?dl- with no transaction ID included, which of course turns up the Purchase Details Not Found error. Can anyone PLEASE help?

    - Rafael

  369. Kidino said:

    Do you need auto-return in your Paypal. If not, look for the Auto-Return setting in Paypal and turn it off.

  370. Rafael said:

    Auto return has always been off…

  371. US computers training said:

    Hi, I’m having the same issue as Shaun “Download file ID 0 is not valid. Please contact webmaster.” Does anyone have any advice? TIA.

  372. Kieran said:

    @US Computers

    No. Thought I had fixed but hadn’t. :(

    The author hasn’t posted anything about it – Download file ID 0 is not valid. Please contact webmaster.”

  373. wholesale NFL jerseys said:

    I like the journalism relevancy of your site and it will a nice-looking decent job of presenting the info.

  374. Oriol said:

    Hi there,

    I would like that the “download link” that the user receives in his email account when he purchase a file it’s encripted. So when that user that just purchased that file copy and paste the link that he just received, can not use that same link to pass it to a friend. Is that possible to set up? If so, could you pleae bring some light to that issue?

    Hope I have explained myself well enough.
    Thanks for your time,

  375. cebrooks said:

    I am trying to use this script for my website. i am having a problem getting the correct script for my paypal order now button. I cannot get it tolink to my ipn.php? buy file. Can anyone help me?

  376. John Farrar said:

    Your paypal button link should look something like this:

    You could also use the FULL URL path to insure proper linking as well:

  377. John Farrar said:

    Wow….stripped out the code there…….

    a href=”ipn.php?buy”

    a href=””

  378. cebrooks said:

    I created a buy now button and linked it to my website’s ipn.php file and I get this error when I click on the button from my website: “SSL received a record that exceeded the maximum permissible length.” Does anyone know how to fix this problem?

  379. cebrooks said:

    Hi john,
    How should my paypal button look?

  380. thatleeguy said:

    Hey Cebrook

    It looks like you are trying to use the encrypted Paypal buttons but do not have an https connection set up.

    So the button is trying to redirect to an https:// version of your site.

    Sound about right? See if you can set one up that is non https.


  381. Aperio said:

    Hi Kidino,

    I have been using this script without issue for some time now (and yes, I have donated) :-)

    However, it seems that since paypal has changed their page format, the script no longer is working at the point of paypal to the thank you page. There is no reference data passed on to that thank you page (and ultimately to the download page, there is no transaction data passed).

    The thank you email does in fact work, but i am not sure how to troubleshoot the fact that there is no data at all being passed from payapl to the thankyou / download page.


  382. Aperio said:

    One note of follow up – the “return to” address when clicking what is supposed to be the return to merchant link is actually the seller’s email address (?) it seems the return to link is formatted incorrectly from the paypal confirmation page back to the site. I’m not sure if this is just a byproduct since paypal changed their page format?

    Any help would be much appreciated.

  383. Aperio said:

    One last follow-up and i promise i’ll try to be still until hearing a response ;)

    I have continued to dig in to try to find a solution, and it appears this is indeed an issue since paypal has changed their checkout environment. It has to do with the rm=2 variable that is used to gather the post data from the transaction. Here is paypal developer the thread in regards to the issue:

    There is some type of workaround using PDT rather than RM though it sounds like it will entail each user having to insert their individual paypal token into the script and auto return being set to on (at least from what i gathered in my quick read through).

    This is definitely not my area of expertise, and not sure how hard it would be to provide the code for this solution until paypal fixes the rm issue… but seeing as though the rm issue is now a month old, paypal is aware of it and yet they still havent resolved it, it is a little alarming to know that the download data is not transmitted to the thank you / download page and that the customers receive an error message.

    Also, i think more people will begin to realize their scripts are broken since this is a global issue and there will be many panic comments posted in here :)

    Okay sorry again to write so much, just trying to shed some light on the situation.

  384. Kidino said:

    Aperio, thanks for digging this up for me. I am looking into this matter. I believe Paypal still sends IPN data, and the sale is still being processed, the customer still gets their purchase email details, and the download links still works, right? Correct me if I am wrong.

    The problem here is that the customers are not redirected immediately to their download page.

    I am trying to figure out how I can solve this with a session cookie, similar to what I use at But it’s kinda hard when you don’t use a database.

    I am looking at solutions/options and will update things here.

  385. Aperio said:

    Yes sir, you are correct on that. The email and actual download link do indeed work fine. It’s just that point from paypal to the download page transition that the data is not passed. Unfortunately this seems to be where the primary expectation lies from the customer standpoint (since in my case it seems most of the download emails end up in spam). So it would be quite nice to have that working again or just a smooth workaround until paypal gets their act together.

    Much appreciate you looking into it! I shall hope for the best :)

  386. Paul said:

    could you make a version that sells files for a donation (instead of a fixed price)?

    In other words:
    The buyer determines the price, like 50c or 10$ or whatever they are willing to give.

    This would be a good one for non-profit organisations to get people to donate something.

    I will certainly donate generously to you, if you get it working.

    Cheerio, Paul

    PS: keep up the good work!

  387. Frank Clarke said:


    if ($mailResult = mail($mailTo, $mailSubject, $mailBody, $mailHeader, $mailParams)) {

    should = be ==?

  388. Kidino said:

    nope, that is right. just a single =

  389. red bull hats said:

    Hi guys!! This is my first website by my self, and i confused that is it good or not made by wordpress or Joomla, i want to choose one 4 me,and give me some advice.Thank you!

  390. discount moncler jackets said:

    Hey guys,
    I hope this allowed, I have never used this website before so I wasn’t really sure what this was going to do. So this is just a test post. I really like this forum, it has some excellent discussions that take place.

  391. gogu said:

    exactly what url do I add in my IPN enable box in my paypal account ? the path to ipn.php or the path to settings.php ?

  392. gogu said:

    about your product, i have a few questions
    1. What is the URL path that I should add in IPN box in my paypal account ? To what php file ?
    2. If I have an ID token paypal has given me ,can I use it with your script ?
    3. The download page and thank you page files, do I have to modify something in them? Or leave them as they are ?
    4. All the files I should store them in my root directory ?


  393. Nam said:

    1. Does your script work on Yahoo web hosting?
    2. Does Yahoo allow your script to be hosted on their web hosting server?
    3. Note: Yahoo web hosting servers are UNIX based and Yahoo does not support .htaccess file

    Thank you in advance,

  394. Support said:


  395. bubico said:

    what is the ipn handler file? ipn.php or settings.php ?
    also do i have to change anything in thankyou/download page ?

  396. bubico said:

    what if i want to use my own thankyou/download page ?
    what changes do i have to make in these php files ?
    c’mon man, i paid 10 bucks for this script. pls answer

  397. bubico said:

    hi. i get this message when testing with sandbox.
    can anyone tell me what’s wrong ?

    We cannot verify your purchase
    Debug Mode. Here are IPN data and transaction result.


    INVALID: We cannot verify your purchase


  398. Stan Anthony said:

    I find it very interesting, I laughed.

  399. james church said:

    Work with the professionals for your IT Business :

  400. Aperio said:

    Your sales link should look like /wherever-your-script-is-installed/ipn.php?buy

    You can customize your thank you page by editing tpl_tqpage.html which means you’ll likely also want to edit tpl_dlpage.html as well (which is your download page).

    The reason you are getting that error message “We cannot verify your purchase” is because since paypal has changed to their new checkout flow, there is a bug which is preventing transaction details from being sent. For over a month now they have stated that they are working on it, but a fix for it has yet to be released.

  401. starcraft 2 cheats said:

    I have some similar to this from Innity which call bottom up ads. The earning is quite good.

  402. dreambox 500s said:

    Thanks for your sharing! very grate!

  403. PHPMyLicense said:

    PHPMyLicense allows you to sell and distribute your scripts without any worry about theft, misuse, multiple domain use, source code stealing and charge backs – it also includes a free online PHP script encoder, find out more information @

  404. David said:

    Does anyone have a fix for the RM setting ?

  405. Oriol said:

    Hi there,

    Does anybody knows how to work this script along with the add to cart button??


  406. john said:

    one question about the script.
    Do I have to enable IPN url in my paypal account ? Or is that’s embedded in this script, and there’s no need to do it.

  407. masterson said:

    does the script work with ebay auctions?

  408. fredrick said:

    I tested this script in paypal sandbox and I found that enabling IPN url in sandbox seller account or disabling it, it works either way. Of course I set offf auto return and PDT also off.
    Can anybody confirm that in live mode the script acts the same way ?
    So, bottom line: Is it necessary to enable IPN url in paypal account , for the script to work in live mode ?

  409. Marius said:

    Does anyone know by any chance how to install google website optimizer on this? For anyone that doesn’t know what I’m talking about there is a bit of code that should be placed on the coversion page (thank-you page) before the tag so it can track the number of conversions.
    Now I’m wondering… is that page tpl_tqpage.html or one of the other php files?

  410. fredrick said:

    can anybody confirm that this script actually works ?
    In paypal live mode not the crappy sandbox mode.

  411. David said:

    theres problems with it just now

  412. Pokern said:

    Yes Omaha Poker is great but without Learning the Poker Rules and Strategy you have no Chance to make Money.

  413. kathy franco said:

    Learn the Basics of Affiliate Marketing .This is an Excellent Wealth System:

  414. Scott said:

    When I put the script in debug mode it works fine, though when I put it in live mode I get the “Purchase Details Not Found” error.

    It does not seem to be creating the dl files when it is in live mode.

    Any suggestions?

  415. Scott said:

    It almost seems to me like the notify_url is not working.

  416. Kidino said:

    Actually, the notify_url is the URL for Paypal to send IPN data. Paypal is still sending IPN data to the notify_url, and Simple IPN is generating the download file data. Customers will still get an email about their download…

    The problem is, Paypal stopped sending data from the Paypal page to the return url. Without those data, Simple IPN cannot identify who is purchasing the product when they arrive at the thank you page.

    A user recently just showed a normal thank you page, saying that the details will be sent to email. Perhaps that is a good idea while I figure this out.

  417. Scott said:

    I semi found out the issue.

    I made this change:

    // if (
    // ($receiver_email == $paypal_email_address) &&
    // ($payment_amount == $product_price) &&
    // ($payment_currency == $price_currency) &&
    // ($payment_status == ‘Completed’)
    // ) {

    if ($payment_status == ‘Completed’)

    I have narrowed this down to be a discrepancy between the $receiver_email == $paypal_email_address. Perhaps I will look into this more later.

    Though with that change my script, though not as secure, works.

  418. mario said:

    Thanks for the script ! It works for me!

    My question is whether is possible to show during the checkout not the email of the provider account but some other thing as the
    name of the company together with the name of the product ??


  419. Luca said:


    how does it works to have not “buy now” buttons, but having this script working as “add to cart”?

    Thanks a lot.

  420. fredrick said:

    I noticed in the ‘ipn.php’ and ‘page.php’ files that the

    ” $script_url ” is spelled ” $script_uri ” with an ‘ i ‘ at the end

    Does that constitute as a “bug” in the script? Maybe this could lead to a fix of the script .

  421. noa hanoka said:

    Learn the Basics of Affiliate Marketing .This is an Excellent Wealth System:

  422. 网站优化软件 said:

    great script and it works smoothly for me.

  423. p3hub said:

    Efox-shop is where to buy cheap kitchen doors totaly awsome product.I got it at buy star wars jedi academy for Buy and love.

  424. Frederic said:


    thank you for this script.

    For people with “Purchase Details Not Found. Contact Administrator.” problem

    create a .htaccess file in simple ipn script directory with this inside:

    order allow,deny

    deny from all

    RewriteEngine On

    RewriteCond %{REQUEST_URI} !^ipn.php

  425. frederic said:

    Can we use or adapt this script with auction (ebay)

    i mean if i sell digital item on ebay
    can my custumer receive an email and be redirect to my download page?

  426. Kidino said:

    Don’t know. Never used this with eBay before and not sure how eBay does it. But I thought eBay doesn’t allow digital products.

  427. buy wow account said:

    how does it works to have not “buy now” buttons, but having this script working as “add to cart”?

  428. white iphone 4 said:

    Great post i found it very interesting and at the same time very informative i will definitely bookmark this site for future reference…

  429. noa farrrell said:

    Very nice place to get Iphone4 for free

  430. David Barnard said:

    On a live test, payment went through, thank you page appeared, BUT.. did not get the download page. Any ideas?

    Also, the fIle to be downloaded.. doe the illustration indicate it is in the same folder as the ipn files?

    Thank you!

  431. Free online games said:

    I recently started to create an online shop..and I hope one day I will make some money with it. Anyway..your tutorial will help me very much in my further actions. It’s noticeable that you are a teacher.. You expose things clearly..and easy to understand..

  432. Adrian said:

    I would like to know if anyone have fixed the problem with Purchase Details Not Found. Contact Administrator. I have tried to chmod the folder to 777 and 666, the download folder and the script folder but it redirects me to yahoo (Page not found). Kidno can you please help me?

  433. Alfred Joline said:

    This is my biggest problem. I constantly shell out my bill on time and make sure to a minimum of double the minimal balance quantity when making my payment. All this and they still give me a hard time when I request a credit score boost. They’ve no cause to not give me the boost, but do it any way. Major Turn-off!!




  435. Skin Care Reviews said:

    That was a wonderful post! Thanks for sharing your knowledge
    with us! I hope to read more of your post which is very informative and useful to all the readers. I salute writers like you for doing a great job!

  436. Alexandrud said:

    Last days a was working to my website and the script worked very well. Today, the script is no longer working. First, i was thinking the trouble was from my modifications, but I’ve uploaded the standard script from this site, and only replaced $paypal_email_address with my sandbox sellers account. And still doesn’t work.

    Is this script still running for you ? Because for me is not working anymore.

  437. buy beats said:

    I enjoyed reading your site.. Lots of crazy comments on this web site… Continue the best work. Looking forward to your next post..

  438. waqas ahmed said:

    Hi I want to pay 10$.

    If someone setup this to my hosting.

    All the things ready, just want to setup it.

  439. Aperio said:

    I’ll set it up for you. Click on my name to go to the contact form on my site.

  440. Private Servers said:

    Habbo Retros…

    Habbo Retros are slowly attracting more users with each passing day, most people prefer to play Habbo Retros with pets according to a recent google study, further evidence also supports that Habbo Retros have lead to an annual decrease in revenue for s…

  441. cheap watches said:

    OH my god, I love your post very much , i love you , I will come back here every day, so memorable …..

  442. designer85 said:

    I’m not getting the email with the expiring link that is in the settings.php. I do get the standard paypal receipt though. I have read through the entire posting here and didn’t see a solution. Can anyone help?

    I don’t know if it is a hosting issue, but my host requires that phpmailer be used when setting up an email form on my site. Could that be tied into why the customer isn’t getting the thank you email with the link? Suggestions?

    Please help, I’ve got a client that want the script up asap. Plan on using as-is until I hear back from you, but would be much better be also getting the email with the expiring link. Thanks!!!!

  443. designer85 said:

    Anyone still come to this site? Any suggestions on my question above? Better yet, would you be willing to help me set this up on my account? I know you have upload-and-sell page, but I would really like to give this script a try first. Like I mentioned before, everything works except the buyer getting the expiring link email. I’m even getting the xxxxxx.php file, so it’s all good except for the email. Please help! My host requires phpmailer to send email from my site and smtp authentication if that helps. Thank you!!!

  444. David Barnard said:

    Yea, I had a similar issue. I will help you. There’s no way to contact you here so please grab an account at so I can message you, ok.


  445. Colin said:

    I have been trying to get this script working all day without success. I have spent over an hour reading all the comments here and am still non the wiser.

    My problems

    1: I am getting the “Purchase Details Not Found. Contact Administrator.” error message.

    2: I am not getting emails as either the buyer or seller.

    3: File xxxxxx.php is not being generated.

    I have two setups 1: Wampserver on my PC and 2: a live webhost sub-domain. The email addresses are setup correctly on my host and I am using the PayPal sandbox.

    Any thoughts or help would be most gratefully received.

    The script seems as though it will do what I want if only i could get it working.

  446. David Barnard said:


    Click on my name;
    Then, click on the contact us. I’ll see what I can do.


  447. designer85 said:

    Colin, I kept getting that error as well in the sandbox. I tried it live with real paypal email addresses and everything works for me except for the buyer receiving the email with the expiring download link. The buyer can still download the product immediately after purchase, but that’s their only chance…if I get any help overcoming that problem I’ll be sure to post here as well. Good luck!

  448. Kidino said:

    Designer85, that sounds right. Payment goes to you, Buyer gets an email with link to a download page. And the download page will expire after some time.

    You can change how long before the download page expires by changing the settings. Checkout settings.php

  449. designer85 said:

    Hi Kidino,
    the problem that I am having is that it is not sending the email (that is located in the settings.php file) that contains the download link. Is this because my host requires sending email with phpmailer? How do I fix this?

    Also, I just tried adding my own digital file to the settings.php file and removed the sample files that were there. Since I am only sending 1 file, I removed the second array that included the 2nd digital file. I tried to make a purchase and get to the point where the download link is and when I go to download I get ‘Download file ID 0 is not valid. Please contact webmaster.’ My digital file is 1 folder down from simple ipn folder.
    Please help. Thanks so much!

  450. OoloO said:

    Try the paid scripts!

  451. George said:

    I’m having the same problem designer85 reported. Doesn’t work in sandbox mode, but works in live mode. In sandbox mode, I get that “Purchase Details Not Found. Contact Administrator.” error message.

    I tried changing the permissions, and got even more problems, such as an “Internal Server Error”. I really don’t want to develop my site in live mode, why doesn’t it work in sandbox mode?

  452. CF said:

    Sorry if this problem has been addressed. I tried “find on this page” with no results. Tons of posts here, and no time to read them all. ………….. My problem is…..some of my customers don’t click on the “Return to merchant” link (link to get to the download page) at the PayPal purchase confirmation page. Even though I have a reminder on my website BEFORE purchase, with a link to a screenshot showing the link location CIRCLED with an arrow pointing to the “Return to merchant” link, the customer X’s out, and expects a download link in their email. If the customer does not click the “Return to merchant” link, all they get in email is a receipt from PayPal for the purchase, but no download link from my service. Is there a way to automatically take the customer to the “Thank You, click here to go to download page” ?? I figure most of these customers are probably soberly challenged at the time, but some are common doofuses that don’t read my reminder, and want me to send them the file or a refund. Starting to be a pain . . . . . . Help !

  453. Ur shit said:

    why is it everyone is having the same problem and why does it says is free when is not?

  454. CF said:

    Well I’m not sure what you mean. Simple IPN is free, and it works great.

    I also discovered a solution to my problem with the customer not clicking on the “Return to merchant link”. I searched the net about the problem and found a site that gave a line of code that turns the small text link into a big gold button. All you have to do is put the following line in the “ipn.php” file :

    Just copy and paste it LAST on the “<input type=" list. Just make sure it is before the "<?php". This replaces the small "Return to merchant" link into a big gold button that stands out. I also have a reminder showing the button before purchase. See a sample of how it looks here :

    Just click on any of the 5 players to see what the button looks like in my pre-purchase reminder to the customers. Hope this helps, and sorry if this was already discussed here somewhere . . . . Thanks

  455. CF said:

    Oops ! I guess this forum don’t like html codes. Let’s try it without the symbols. The line of code for the ipn.php html looks like this:

    input type=”hidden” name=”cbt” value=”CLICK HERE TO GET TO MUSIC DOWNLOAD PAGE”

  456. wholesale digital thermometer said:

    The content of your blog is exactly what I needed, I like your blog, I sincerely hope that your blog a rapid increase in traffic density, which help promote your blog and we hope that your blog is being updated and placed can always be richer and more colorful.

  457. Daniel Duhig said:

    I have everything set up and is working fine with the test files, but when I set it to download the full length video I get a zero kb size corrupt file downloaded. the full video is a 120mb mp4 tried a zip file still the same.

    Is there some kind of size limit or anything?

    Any help much appreciated.

  458. CF said:

    Sounds like maybe a bandwidth limit, or file download size limit, or timeout with your server? Not sure, but seems to me if you get the download page and the download link and prompt, it can’t be a Simple IPN problem. Only limit I know of with this script is the time you set for the download link to expire. But no matter what the time limit you set for the download link, a download should continue as long as it takes. In other words, the download “Link” is what expires, not the download process. By the way, I like how you can even set the link expiration time to .25 (15 minutes) or even less. Great script . . . . .

  459. Ashi said:

    I have the same problem like everyone else!
    Purchase Details not found.
    I contact Hostgator, They only accept 755
    is it possible to get the script run with that setting?

  460. CF said:

    All I know is Simple IPN works great, and has nothing to do with any limitations your web-space host has in place for file size storage, uploads, or downloads. Simple IPN has nothing to do with your file size. Simple IPN only provides PayPal purchase functions, a download page, and an expiring download link for your file. If your file is too large, corrupt, corroded, moldy, or even on fire, it is not a Simple IPN script problem.

    “Purchase Details not found” ??????? Sorry, I’ve never seen that error message.

  461. Kidino said:

    When you get purchase details not found, that means Simple IPN was able to create your customer’s purchase info file. That is normally because of file permission, or something like that. And a 755 should be enough to create files.

  462. designer85 said:

    Everything works but I do not get the email with the expiring download link. I submitted a support ticket to my hosting provider and they said, All e-mail sent using Brinkster hosted e-mail addresses on our e-mail servers require password authentication. I do not see that the code allows for authentication.They sent me this link and said I may have to add authentication to the script, but I don’t know how. Can anyone take a quick look at this and let me know if they can help? Thanks!!

  463. Pig Farmer said:

    I asked on the WF but no reply – which file/url do I give to Paypal for the IPN setting?


  464. iphone 4 case said:

    interesting things to read about a variety of subjects, but I manage to include your blog among my reads every day because you have interesting

  465. Jack said:

    Thanks for the great script! It’s awesome.

    I noticed a little problem: when a buyer has apostrophe mark in their name or business name, the download link doesn’t work.

    It gives some error “line xx” on php script. Any solutions? Or is it a problem in my server settings? Thanks!!!

  466. Kidino said:

    will look into that Jack

  467. IPN Code said:

    Nice scripts to bad there are lots of bug where able to fix most of them but there was one i wasn’t able to. When you upload big files ans download them after about 10-20 minutes the download stop so you can’t use big files. i had to edit the code to make it a simple href code but on that way people can see the link so that not good any idea about how to fix that problem?

  468. Dave said:

    First, I’m struggling with the size. What file could possibly take over 20 minutes to complete? Maybe on dial-up! I wasn’t aware dial up still existed. Anyway. the two things you should have set. 1-the sandbox is set to “0″ & 2-hours set to enough time for downloads to complete. (I don’t use sandbox)

    $paypal_sandbox = 0; // 1 for test more, 0 for production mode
    $expire_in_hours = 10; // how many hours before download expires, in hours

    The next thing you need is your files to be in the same folder/location as all the other files… just as indicated below and in the directions. Paypal will add the 16 character transaction ID to the url then expiring it according to your settings. Though someone sees the URL doesn’t matter. They still need the transaction ID to access the download…….


    ‘name’ => ‘Sample Audio MP3′, // normal name of the file
    ‘filename’ => ‘audio-lesson.mp3′, // filename the customer will gets
    ‘source’ => ‘sample.mp3′
    Can one take the entire url.. ( and send it to someone? I do not know. I imagine PayPal places a cookie on your machine to prevent that.

    I have not experienced any bugs. Can you be more specific so we all know what may potentially cause us problems?

    Thanks, Dave

  469. Kidino said:

    I am fixing the bug with the apostrophes and also implementing HTTP_RANGE for the download.

    With that, you can even use download software like FDM and such to download the product. This will allow the download software to download small chunks of the file rather than having to download the whole file at once. You should be able to sell 20, 30 or maybe even 100MB file.

  470. CF said:

    FYI . . . I have tested the expiration time setting several times, and found (at least with my XP and IE8) it’s not the “Download” that expires (as it’s written in the settings). It’s actually the download “LINK” that expires. I just tested it again tonight with a 50Mb zip file. I set the expiration time to 4 minutes. I waited until there was 1 minute left and started the download. The download took almost 10 minutes with basic (slowest) DSL, and finished completely with no problems. So maybe different browsers handle this expiration script differently, but with IE8, the download ” Process” has always continued as long as it took to complete, no matter what amount of time I had the link set to expire. This is good because people still stuck with dial-up can still buy my product knowing the download will finish ( in a day or so). ……..

  471. Kidino said:

    CF – did you get the latest version I just uploaded. See my comment above yours.

  472. IPN Code said:

    Hey Kidino thanks for trying to fix that hehe the file i want to download is 200mb but if the download stop in the middle after 100mb i will prefer to take the risk and use the real path other then getting complaints from my customers.
    I have been trying about 10 different php hide download path scripts to fix the problem but seems for some way all of them having the same problem.
    I just tried the new update and seems like there is an error
    Fatal error: Call to a member function set_byfile() on a non-object in /home/ on line 42

  473. CF said:

    Yes, I saw your comment Kidino, but I am completely satisfied with the original version. I have no problem with the download stopping with time or size. Everything works perfect, and I don’t understand how any part of Simple IPN can be the cause of the download process stopping because of the link expiration time, or the size of the file. Seems to me, after trying 10 different scripts, and your download stops at 100 mbs with each script, that sounds like a server download limit, not a script problem. But if the new version with the option to download in small chunks works . . . . . then great !

  474. Pandora beads wholesale said:

    We wholesale pandora in a wide range of shapes and designs. Pandora beads wholesale always save your money. – wholesale beads can get more discounts.

  475. IPN Code said:

    Hey Kidino is there a chance you will be able to fix the script? or just get it to its old self because it not working at all now shows an error on the dl page.
    Thanks for the help.

  476. Jack said:

    Thanks a lot, Kidino! With the apostrophe update, should I replace all the php files, or just some certain files ie. page.php?

    Thanks again. Your script is great!!

  477. IPN Code said:

    Hey Jack don’t replace it yet i replaced it and lost the files there is an error on the dl.php file. hehe i should have update it but was doing things fast and forgot to do so.
    Anyway wait for update from here before making any changes.

  478. Kidino said:

    The error in dl.php is fixed, thanks for the note from IPN Code. I have uploaded the new one a few hours ago. It was missing a simple include().

    @Jack – major changes are in function.php and dl.php. That’s all. You can just replace those two and it should work fine. Do backup your last installation just in case.

  479. IPN Code said:

    Thanks a lot Kidino seems like it still have the problem with the download for some reason but will work with out that.

  480. Jack said:

    Thanks a lot!

  481. Pins said:

    i would like to ask some few questions about this product can you provide an email for my inquiries?

  482. Dave said:

    Pins, this blog is for your questions.

  483. Dave said:

    Yessir’, but that’s easy.

  484. Jon said:

    Hi there,

    I have tried using this application “Simple IPN,” but I had some trouble.

    One thing is, when you reach to the, “Thank You” page and ready to click to download, an error occurs:
    “Purchase details Not Found. Contact Administrator”
    What could be the problem?
    I have put my products in different sub-directories, but nothing. (I followed your method from your clip)

    Second, is there a possibility of a third party copying “my” digital product?
    It says that in Paypal during the transactions

    Thank you .

  485. [PHP-General] PHP script for digital downloads linked to files on another server? - Delphi-PHP Forums said:

    [...] earlyer yesterday. I then came across this script which is free, Simple IPN – FREE Paypal-IPN PHP Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — Problem is I have my files located on mediafire, not where the server that is hosting the [...]

  486. TheNoob said:

    Should I create the product first inside Paypal and then put the same details in settings.php or do I just need to enter the details in settings.php and the script will create the product inside Paypal?

    (Sorry, I’m a noob. :) )

  487. admin said:

    there’s no need to define a product in Paypal

  488. Bob said:


    I’ve read a lot of comments in trying to find a solution to my problem (“Purchase details Not Found. Contact Administrator”).

    The only possibility I found would be changing the ipn file to ChMod 777. Unfortunately, did not work out. I got an error 500.

    I contacted my hosting comp. and they said that they do not support ChMod 777.
    Thus, is there a way in bypassing 777?

  489. Eran said:


    This is a great script, however, I would like to modify it a bit.

    All I want is the script to send out an email to the customer after purchase. Inside the email, I want the file as an attachment.

    It would be great if you can tell me how to do that :) !

    Email me @


  490. unomyname said:

    Am I wrong, or does your script only allow ONE price for ALL products?

  491. Kidino said:

    Simple IPN is for ONE product only, but that one product can have multiple files.

  492. Kidino said:

    By the way, some guy is still trying the $0.01 purchase, which of course doesn’t work with SimpleIPN

  493. Jahjah said:

    Hi – Super script – really easy to install.

    I have one question please, in my tpl_dlpage.html and tpl_tqpage.html I am trying to include a server side include file for my top and bottom navigations. When the page displays, the includes are not showing (I am not even getting an error message)

    The code I am using is:

    Any ideas anyone.
    Once I get this sorted I will be paying the $10.00

  494. Jahjah said:

    hmm.. the code I was using did not show up here. :(

    This is the code (minus the spaces)

  495. Jahjah said:

    and another try:

    # include virtual=”../footer-home.html”

  496. admin said:

    Jahjah, I haven’t try SSI but I don’t think the template will work with SSI because the template isn’t run like normal SSI file. The file is read and the variables are replaced with transaction info and put out to the browser. Plus, I thought SSI would require a special extension like .shtml or something…

  497. Jahjah said:

    Hi – Thanks for getting back to me. You are right – the SSI will not work, I believe this is due to the page being rendered as a PHP page in the browser: /page.php?dl-4FH665300R4225324

    When using PHP i do not think it is possible to have SSI included in the page.

    I have opted to get around this by using an iFrame for the top and bottom navs. It does mean I am having to edit quite a bit of CSS but hey, that’s just part of what we do heh!

    For your reference, if you edit the _htaccess file, you can make .HTML files process as .SHTML without having to name all your files .SHTML

    Once I do get this all sorted, I will send you through a link to the site along with the $10; so you can see the work we have done with the IPN.

    All the best – Jahjah

  498. Ciaran said:

    Thanks heaps for the script – I have one question. When our customers are downloading their file (it’s a zip file that unzips into a folder containing several files), they cannot open/unzip it. Their computer doesn’t recognise the file type.

    Any hints?

  499. Kidino said:

    Check the download page and download the file again yourself. See if you can open the new downloaded file. If you can, then the problem is with the user’s computer. Get them to download and install software like 7ZIP or some other compression tool.

  500. Daniel said:

    I tested 3 days with the paypal sanbox i get always this error “Purchase details Not Found. Contact Administrator”.

    Then i stoped testing with sandbox and make a live test with a 0.10 $ product and it works fine.

    So i think there is a problem with the sandbox mode. Live Mode is awesome :-)

    Best regards

  501. Richard Fox said:


    I have sorted most of my problems and everything works apart from receiving mail. I have another mailing script for a contact form with works fine but the mail() function in the functions.php script doesn’t. I have used the sites email address which works in the contact forms so I am at a loss….

  502. Webmaster said:

    Probably, it would be a good idea to put a line in the readme file regarding the folder permissions. No need to specify chmod value, just tell them to have the folder (and, eventually, folders above the ipn folder) WRITABLE. The chmod value might be different on various servers but at least you should mention it in the readme file.

    Had problems until figured it out by reading the comments above. You can save a lot of time and frustration adding that note in the readme.

    Thanks for the script – by the way!

  503. holmqvist said:


    thank you for the great and easily configurable script!
    I am not a professional with php and could use a little help with the following special costumization:

    We need to insert data like filepath, a filename, a price … as a variable (not set fixed in the settings.php), transmitted e.g. per _POST … Somewhere
    on it’s way back from PayPal these values get lost.
    I would love to get a solution for this problem, so that these informations remain available until the end of the payment process without getting lost.

    My idea is to temporarely save the values in a txt-file oder database, but I dont know how to realize it. Do you think anyone could help me out with this?

    I would also pay for an implementation/ solution.

  504. ferragamo sale said:

    If you can, then the problem is with the user’s computer. Get them to download and install software like 7ZIP or some other compression tool.

  505. holmqvist said:

    Ok, now i have a solution to insert informations like price, name and file with php-variables instead set values in settings.php.
    But, i want to skip the “thank you” page (obsolete and to much clicks) and redirect to downloadpage. Any idea to solve this?

  506. Chris said:

    Thank you for a wonderful script. I use it for my database sales and now going to use it for Templates I just finished Some are free and some are pay templates. My question is how can I make it free to download instead of passing it off to paypal it would just allow the download. The reason why is I want to use the function of Hiding the download.
    I looked for a good Plugin for wordpress to hide the download link and have not found one.

  507. David said:

    I really want this script to work and send you your money that really deserve.
    However, having spent the last 3 days trying to get it to work seems to have landed me with a permenent headache:-(
    Here is my problem:
    1. Any folder chmod other than 755 brings up a FORBIDDEN notice.
    2. Using chmod 755 takes me to paypal sandbox & allows me to buy.
    3. Back to merchant take me to my Thankyou Page with the paypal information filled in. But, clicking on the download page link results ‘Purchase Details Not Found. Contact Adminstrator’
    I have studied the comments above but still cannot seem to sought it out.
    Can you please help put me out of my misery!

  508. steve said:

    hi, can you please explain a bit more about how this script works?

    i modified settings.php and set sandbox to 1 and uploaded file to my site. i create a sandbox account on paypal. i add a download button to my download page that links to ipn.php?buy

    i click the button, get to paypal sandbox, purchase the item, ok. i check the sandbox email box and see a receipt for payment but no email with a download link. where do i find that? where is that email generated, by paypal or by your script?

    does this script work in sandbox mode or do i need to find someone to do a real purchase since i can’t buy from myself with paypal.

    thanks, steve

  509. Aaron B said:

    I have tried installing this a few times. I do a sandbox test, it shows a sale being done, but I get this error:

    ‘Purchase Details Not Found. Contact Adminstrator’

    After being agitated, I tried this one:

    Tested it in sandbox as well, worked flawlessly.

  510. Aaron B said:

    Obviously, sandbox testing fails each time, I see this with the multiple posts above.
    I now use Digisell 1.0

    You can have it set to do sandbox tests and the files are emailed in the form of a download link with a time limit. (set by user). Its also generated the button codes and works great.

    I think SimpleIpn is a great script, but making it work in sandbox woulod be ideal. I mean, its cool to use it all but testing your sale products prior to making them available to buy (live) would be great and safe.

    I always test the download/purchases to make sure it all works smooth.

  511. carleton said:

    The problem with sandbox testing is that PayPal sandbox returns a $payment_status variable value of Pending and ipn.php requires a value of Completed. About two-thirds of the way into ipn.php find ($payment_status == ‘Completed’) and change Completed to Pending. This allows the script to move on to writing the test purchase details. Don’t forget to change back when you’re done sandbox testing. Also, creating and using the $debug variable helps in solving these issues.

  512. CF said:

    I didn’t like or trust Sandbox testing. I just created another separate Email and PayPal account, set my purchase price to $1.00, and tested it the real way. So it cost me a few cents for the PayPal “Micro Payment” transaction fees . . . . . I got to see it work as a REAL customer would see.

    Sandbox testing may work good and be best for some, but even after Sandbox testing, I recommend either a friend or relative trying it, or just set up another PayPal account and be your own first customer to be sure . . . . .

  513. us cell phone said:

    us cell phone

  514. monclers said:

    Penhaligon’s stores always prove to be an Aladdin’s Cave of inspiration. Standout gift ideas include their Leather Washbags for both men and women, cashmere and silks.

    There is something very ‘New Year Resolutions’ about giving a Diary as a Christmas gift. You won’t find one more glamorous one than at Smythson.

  515. chegzi said:

    That list saved me lots of time. I do appreciate your work! I’ll put a

    link to you on my blog. Thanks

  516. Claudia said:

    Rebuilding website after major hack. Love your script but can’t get it to work from the start.
    I have uploaded to server , unzipped, and altered settings file. I have pointed to ipn.php?buy but it opens up the ipn.php file and displays script. Even when I place it directly in browser !

    I know I am doing something stupid. Can you help ??

    This is what I am pointing to

    Thank you

  517. Claudia said:

    I finally got things working. Don’t know what I did but it is now working great.

  518. Classic ugg boots uk said:

    Great article,thanks for sharing with all of us .

  519. marketing said:

    Can’t get this thing to work. It keeps saying:
    ” Purchase Details Not Found. Contact Administrator.”
    After clicking on the Download link when returning from paypal sandbox…. Also no email in test email….( Server allows send emails )

    Did you just come up with this script only to sale the payed version after people get frustrated on it? No good marketing strategy boy ! That’s why you video is lacking of information, waste of time !

  520. CF said:

    This free script works great for me and hundreds of other people. No need to badmouth it, and the creator just because you can’t figure it out. Maybe you overlooked something ? Go get a tissue and keep trying. After you figure it out, you can start working on your spelling . . . . . .

  521. ok said:

    It is so luck to see the article today, great article, and great author. I learn something new on different

    post everyday. It is always refreshing to read posts of other forums and learn something from them.

    Thanks for sharing.

  522. Dave said:

    Doesn’t this require paypal app approval or an app ID? If not then what is the difference between this an an app I can develop on paypal’s


  523. Ch1vers said:

    Hey guys, this is exactly the script I wanted! Like the many, many people before me, the transaction file isn’t writing and I’m getting the product error page… I’ve read pretty much all the comments and yet and seen a solution…

    Is there one?

  524. Ch1vers said:

    ** HADN’T seen a solution…

  525. PHP (Mailer?) Not Working. said:

    [...] (Mailer?) Not Working. Hi, I recently tried install this set of php scripts on my website (Simple IPN: Free Paypal IPN PHP Script for Digital Download Products — so that I could start selling digital downloads. The paypal function works fine but the customer [...]

  526. Ch1vers said:

    Hey Matt,

    How did you get it to work??! I keep getting the “Purchase Details Not Found. Contact Administrator.” message.

    Do the emails work for you, as well??

    Finally, which host are you on?

    Thx :)

  527. Daniel Duhig said:

    @Chi1vers I couldn’t get the transaction ID file to write in PayPal sandbox mode, tried everything, tested using live PP accounts and it now works fine.

  528. carleton said:

    Ch1vers, see my post above regarding ipn.php. Reading through this thread it looks like 90% of the issues are due to the Paypal response not matching the ipn.php code. The response from PayPal after a live transaction should be “Completed” not “Pending” or else you’ll get an error message. Try to make sure your PayPal merchant account is sending this response. The email issue could be related to the error message above. If you get an error on a live purchase, an email won’t be generated. Finally, I’d suggest making sure SimpleIPN is in the root folder of your site and the folder is writable (777). Hope this works.

  529. Andraž Rihtar said:

    In sandbox mode the customer doesn’t receive any e-mail with the download information, is this normal?

    Sorry, but I don’t want to end up selling products with a script that doesn’t work completely.

  530. CF said:

    Sorry folks, but I suggest skipping the “Sandbox Mode”. Too many complications/problems as we can see from dozens of posts for help concerning the Sandbox Mode.

    The best way to test the script is with a “LIVE” PayPal account. It’s easy and free to set up another test PayPal account. Just set whatever you are selling, to the price of $1.00 (or less).

    Then try to purchase your product using your REAL test PayPal account. Yes, PayPal will take a percentage of each test sale, but for me it was well worth the dollar or so, to avoid the time and headaches trying to figure out the complications/ problems with the Sandbox Mode.

    Skip the Sandbox Mode ! Test your script acting as a real customer with a LIVE PayPal test account !

  531. James said:

    Ok, this keeps getting marked as spam – hopefully it will get through this time – it’s not spam, and hopefully it will help someone!…

    Hi everyone,

    First of all, I think this is an excellent script. I’ve had some trouble getting it working (my own fault as much as anything) and wanted to share my experiences, hopefully this will help someone else.

    1) PHP in safe mode. If you are finding that the email doesn’t come then it could be that PHP is running in safe mode on your server. This means the mail() command will not run, unless you remove the 5th parameter. So, go to the mail() command in functions.php and remove the $mailparams, it might work for you too…

    2) Breaking paypal account. If you randomly try things to get it work you might think it is a good idea to setup IPN in your paypal account. It is NOT! Once you turn this on and then turn it off again the OFF seems to stick, and this script will never work with that account again 

    3) If you purchase the $10 version without the branding be aware that the dl.php and seem to be broken in this package (maybe it’s just one or the other – I’m not sure). Using these gives you a message about set-time-function or somesuch and spits a lot of symbols out rather than your download. I replaced these two with files from the free download and am away happily.

    4) If you are having trouble consider investing in the paid version so you can turn on debug – ultimately this lead me to the answer to item 1. I reckon if I had bought the paid version straight up, ran in debug mode until I have everything worked out it would have taken me a couple of hours to get this up and running (not 2 days….)
    Hope that helps – good luck!

    5) Don’t bother with sandbox at all – setup a 10cent product and just test in live!


  532. carleton said:

    In response to Jake’s comment, you don’t need to get the paid version to test in debug mode, just add $debug =1 as line 2 in settings.php for debugging. Don’t forget to reset to 0 for production.

  533. carleton said:

    … and don’t forget the semicolon to close the line of php code.

  534. Claudia said:

    recently purchased your Simpleipn. I had tried the free version and loved it. I am just now building a site to sell digital products. I’ve uploaded to server, edited the settings file and renamed ipn.php to ipn.php?buy when executing the link I am getting “No input file specified”.
    I went back and reinstalled free version and it does the same thing. I know this script worked and worked great !
    What is happening ? Nothing has changed (that I am aware of) on server. What could i be doing wrong ?

    Thank you for any input.

  535. carleton said:

    Some users might find this helpful if their customers aren’t clicking back to their sites to download. Adding the following line to ipn.php in the Generate Paypal Button section will create a yellow button instead of the standard Return to Merchant link.

  536. carleton said:

    Sorry the bulletin board is stripping out code try this:

    (left carat symbol) input type=”hidden” name=”cbt” value=”Click Here To Download Your Product” (right carat symbol)

  537. Rafa said:

    ESTO NO FUNCIONA , ja ja ja:

    Bueno yo he pagado por el código expuesto en esta web y aun no he conseguido hacerlo funcionar, cuando lo haga funcionar correctamente, exponer dicho resultado entre los comentarios de esta web, no obstante he pedido ayuda al creador del sitio web y espero me me ayude a solucionar dicho problema, lo mas pronto posible, ire informando a los futuros usuarios y visitantes del sitio web de la utilidad y funcionalidad del sitio web y de su codigo IPN de paypal, un saludo Rafa

  538. Ch1vers said:

    I find this increasingly depressing as the days go on…

    Just from the outset I’d like to say that “uploadandsell” is not an option as the think I’d like to sell is over 30MB. [as I mentioned before, customer details not writing to server, nor is email being sent resulting in “purchase details not found messsage)

    1. I’ve always tested it “LIVE” in production mode, “0″.

    2. my system does allow mail to be sent, I tested the script

    “(left carat)? mail(“”,”test message”,”This is a test”); ?(right carat)

    3. The whole site is CHMOD 777!!!!

    4. the files are in the root folder


    Could someone suggest and alternative? Or a database addition? The author of the script doesn’t want to include a database because it will make it more complicated, but this script has been the most complicated I’ve ever used so…


  539. Web Developer said:

    Hi can you give me other version of IPN script not for digital download?

    can you insert tracking code from shareasale merchant?

    We believe this requires knowledge in Paypal IPN like sample code

    Tracking Code details for PayPal Website Payments Standard

    Unfortunately, integrating with PayPal Website Payments Standard is more difficult than most shopping carts. You will need to setup their Payment Data Transfer system before integrating with ShareASale. See PayPal’s documentation and sample code here:

    Unfortunately, ShareASale is unable to help in setting up the Payment Data Transfer system. If you require assistance you should contact PayPal directly.

    Once you have the Payment Data Transfer system running, you can use the following tracking codes in your Auto-Return script:

    Response.Write(“<img src=”"” & mcGross & “&tracking=” & txToken & “&transtype=SALE&merchantID=XXXX”" width=”"1″” height=”"1″”>”)


    echo (“<img src=\”$amount&tracking=$tx_token&transtype=SALE&merchantID=XXXX\” width=\”1\” height=\”1\”>”);

    Where you replace XXXX with your ShareASale merchant ID number.

    Please note there is currently a bug in the PayPal sample code for PHP. If you are running PHP, you will need to change the line that reads:

    $amount = $keyarray['payment_gross'];

    to this:

    $amount = $keyarray['mc_gross'];

    we sell advertisement and the buy button was a drop down. we want people can buy this even they are not member

  540. Tresco said:


    Thanks for this wicked, free script Kidino! I have been screwing around with IPN, API, digital goods, blah blah blah at Paypal trying to find an easy way to do what your cool script does. I am still installing and testing now, but so far so good!

    I have just one question for you or for anyone else that can answer:

    Is it okay to have the downloadable file in a passworded folder on the server? or will this prevent the script from accessing the file?

    Alternately, because this script is creating an expiring link, is there no need to worry about securing the file? (obviously I am wondering if hackers or others can tinker around and find the download folder if it is not secured/passworded).

    Thanks for any input.

    Thanks again for the script!!! you rOCK!!!

  541. tresco said:

    Hi again.

    Unfortunately I am also having the “Purchase details not found” problem, but mine sounds a little different from what I have read above.

    - I asked my friend to try to purchase a test pdf file for download and he was able to make the purchase got the thanks for your order page from Paypal.
    - and then when he leaves Paypal, he gets the Thank you page from the script with the link on it.
    - when he clicks on the link, he gets the “Purchase details not found” page/message.
    - then he gets a receipt email from Paypal. but no mail from the script.
    - then for some reason, the page.php file from the script appears on his desktop.

    Also @ Frederic (or anyone that understands this), you said people with the “purchase details not found problem” should do the following:

    create a .htaccess file in simple ipn script directory with this inside:
    order allow,deny
    deny from all
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^ipn.php

    Does that solve the problem? What does adding that file do?



  542. Ch1vers said:

    I’ve cracked the problem… for me at least.


    “ —>

    Re: What happens if your bank ID isn’t verified and u get money on paypal?
    Jan-19-2011 08:09 PM

    Welcome to the boards!

    If a payment that has been sent to you is Unclaimed because you must become Verified to accept it, you have thirty days from the date of the payment to become Verified. If you have not been able to accept the payment by day 30, the payment will be automatically returned to the buyer and they would then need to re-submit the payment to you.

  543. tresco said:

    I still haven’t figured out the “Purchase details not found” problem. Nor have I figured out why the page.php is downloaded to the buyer’s desktop when the script runs.

    Anyone with any clues? Kidino?

    Also, didn’t really understand the chmod very well as I did not find anywhere to “Chmod 777″ a folder so I asked my hosting service some questions. I hope that dialog helps those others of you that also dont understand how to change your chmod/permissions. Also you should note the security and functional caution I was given about setting your folder permissions to 777 (my provider is by the way).

    Q: In my ftp manager, I found where you can set permissions for folders and I set the IPNPHP folder to “write”. Is that the same as chmod777? The directions say it must be 777 or at least 766…

    A: Thank you for contacting Online Support.

    I understand you have an issue with updating your permissions. The permissions value 777 means to assign read, write and execute permissions. There are two types of general permissions and three types of advanced permissions you can specify for Linux shared hosting directories. Advanced permissions can be set for both directory users (website visitors) and owners (website administrators).

    General Permissions

    Web Visible – Permits users to browse files and directories through a Web browser.

    Executable – Permits the execution of scripts.

    Advanced Permissions

    Read – Permits anonymous viewing of directory content through a Web browser. If read permissions are not granted, FTP credentials must be provided to view directory content.

    Write – Permits anonymous modification of directory contents.

    Execute – Permits the execution of scripts.

    Q: So If I want to run a PHP script, as I mentioned, must I enable all three: read, write and execute? Or am I reading your mail too literally and I need only enable execute/executable?

    The reason I ask is that it seems dangerous to allow anyone (anonymous) persons to read and of course make changes to that directory since it is the script directory and also some of those files contain product download information for actual purchasers of the product.

    From my limited understanding, I am just supposed to “allow the folder to be written to by the script”
    and that the write permission must be 777.

    SO… Am i understanding you above to say that I can just enable execute permission to do the above?

    And also, do I need to set both the executable under General Permissions AND the execute under Advanced Permissions, or is either ok?

    A: Dear Tres,

    If you need the permissions to 777 then you do need all 3 enabled. That is correct. You will need to set them in both locations. That is a great question.

    So, need I worry about the security of the scirpt folder (simpleipn which I need to chmod)? If so, can I password it still have the permissions allow the script to execute?

    A: Thank you for replying. It appears that you want to set your file permissions to 777, but are concerned about the security of your site and hosting account, which is understandable.

    You should be concerned about security when setting permissions to 777, as this will allow others to alter the file.

    You may not be able to password-protect the file and still have it function correctly.

    You may need to consult with the provider of the script or application to see if another permissions set, like 747 or 755, can be used, since these will still allow the script to be publicly read/executable.

  544. Dave Ratliff said:

    The thank you page that the customer will arrive at when the click on Return To Merchant at is going to the { die text and not the tpl_tqpage.html ?

    ** I will pay for the program if I can settle this issue. I really like the program. ***

    The above URL is where I have the script installed.

    My test purchase is at:

    I have not made any changes – except to edit the die text.


  545. Dave Ratliff said:

    The “Purchase details not found” I found is that if you are puting the script in another directory you need to put the two dots in the settings file. Example: ../directoryname/filename.pdf

  546. Alone said:

    No true multiple products support. This was all too good to be true. :(

  547. Ch1vers said:

    When ever I need to see a new product, I just add a new IPN folder e.g. …/simpleipn1 (links to product 1), …/simpleipn2 (links to product 2) etc…

  548. Dave Ratliff said:


    I got the script working great now. Several sales with no issues once installed correctly.

    See it work at


  549. uggs boots uk said:

    darling Easy UGG Standard Upright, assembled summation convenient Dark-dark Typical Crocheting. .

  550. Tim said:

    First, Kidino, thanks for a great script and years of support on your site and others.

    I got it working, yay! and learned alot in the process.


  551. Rilwis said:

    I’m using your script. It’s great, but the customer info file isn’t created (even in debug mode). I’m using Sandbox for testing. Can you show me the way out of here?

  552. David Beale said:

    After a couple of days altering permissions, owners, .htaccess… and reading other people’s comments, PayPal’s sandbox works every time, never has an email been sent, and after clicking on the download, “Purchase details not found….” is as far as it ever gets.
    Changing the recommended .htaccess file to leave out the deny all, allows the “Purchase….” error to happen; otherwise the .htaccess (“RewriteEngine On
    RewriteCond %{REQUEST_URI} !^ipn.php” gets a forbidden notice.
    I can’t crack the code on this one. I suspect the situation would be exactly the same with the $250+ commercial shop I bought, that is far to complex for a person to bother with for just a couple of pdf download files; and the present increases in security would probably stop that form working — lots of 777 that got hacked to imitate PayPal and BankAmerica in two of my websites.

  553. Berilac said:

    Thank you for the script!

    I guess there is no way to get the payment confirmation from PayPal immediately, when the user pays. I guess this can be done only in marketplace. Is it?

  554. Sean Blaney said:


    I have found the issue that I believe is causing a lot of the “Purchase details not found” problems identified above. Please drop me an email and I will explain.



  555. Eon said:

    I need to know where and how this script should be placed. Thanks

  556. Eon said:

    Will this direct the buyer to Paypal before the file is able to be downloaded?

  557. Alexandru Dicu said:

    Great script. Works perfect. I have modified it to process the payments as donations. :) I just donated 10 bucks and I’m happy. Thank you for this great alternative to handle PayPal payments.

  558. Eon said:

    Hey Alexandru
    Since I haven’t received an answer from the Author, could you assist me in getting this script to work for me. I keep getting a message about a problem on line 26. Thank you.

  559. Alexandru Dicu said:

    The script is all right by default. Make sure you change permission to 755 for ipn.php. This means it needs execute access. Otherwise it won’t work. It may also be required to set 755 to another files either. About the line 26, it just set an variable. I don’t see what the problem could be.

  560. Eon said:

    I want to thank you for your response but I still don’t know where to change the permission (on what line) in ipn.php. I really need this script to work, I really would appreciate any assistance.

  561. Eon said:

    After uploading the settings ipn and ipn.php files, where would I change permissions to 755. I really need more details that’s where anybody will misunderstand. You talk about permissions the Author doesn’t.

  562. Kidino said:

    You need to allow permission for the script to write new purchase info file when new sales occur.

  563. Eon said:

    It would be a good thing to understand where this is done, in the ipn.php- where exactly. Remember, not everyone has experience with scripts, therefore it would be good if you were more detail-oriented. I do wish to purchase the removal option but in order for you to increase sales you must give support-that’s how legitimate business operate.

  564. Alexandru Dicu said:

    You don’t have to change anything in ipn.php. When you upload your site which also contains the file named ipn.php you do this using a CPanel that is provided from your website host. Or you can use a third party application like WinSCP. So, you connect to your host and there you put your files using the File Manager provided in the CPanel. These files that you just uploaded have some properties named FILE PERMISSIONS. Right click on a file and select to Change Permissions. Then you will get a new window where you can set the permissions to 755. It means the file ipn.php has now the right to write new files on the server host. Now, ipn.php can create the new temporary files that are created when a payment is made. Look in the following screenshot how it should look like.

    I hope this helps you. Have a nice weekend.

  565. Mike said:

    Ok, so i finally got this settings page sorted to work with paypal. I can get the link to go to the paypal site, i can pay. BUT the link doesnt work, were does the link start from the top? like, i have the php files down like 3 folders and the file is 1 folder below the php files????
    ALSO, I do not get an email from the seller. why??? is it, paypal. what do i set the ipn settings in paypal??? or do i turn that off???? i dont think so? also, what do i put in the php settings file 5th row down, my name, ya i got that, and my website domain…but could this be why no email?
    Once i get help and this works, i will post a link to some more detail;s for those trying this after me…. its really cool though….much appreciated….

  566. tom3my said:


    first i want to say “good work and great script”.
    But i really want to secure my downloads for example with a .htaccess file or maybe php. Even the downloads are not easy to guess, some searchmachine like alexa for one. Is often used to find downloads like these. So how do i protect my files with this script?

    does anyone have an idea?

    Cause with that this script would really be the best ;)

    And would it also be possible to have the download automatically be started, without any mails or links. Or is paypal just not fast enough with confirming the pay as i read in the comments?

  567. tom3my said:

    I tried to make an htacces that say to deny all access to download and let it handled by php. But i still can download the file. does that mean that the download isn`t really handled by the php`s?

    Does it then only create an expired downloadlink and not have any handling with the download at all?

    How can i secure it , without placing files under web root cause i can`t? Php or htacces any help would be really appreciated.

  568. Car Battery Replacement in Dubai said:

    Enjoyable thread and a fantastic way of writing. Thanks for the share and video. Hail to comedians and party attendants.

  569. A guy from the '60s said:

    Installed and got the ever-popular “Purchase details not found” problem. Emailed Kidino who said try it live – not sandboxed. I did and it worked, just like he said. Hope this maybe helps a few of you who are having the same problem.
    Sure it’s a little quirky, but simple. I like it. Thanks Kidino, hope you’re making a few bucks. I was happy to make pay my little share. DP

  570. Mike said:

    I am still having trouble with this….

    I get this error, ? anyone, help?

    “Download file ID 0 is not valid. Please contact webmaster.”

  571. Mike said:

    Also, I didn’t receive an email from the seller(myself) .

    I assume i am suppose to receive an email as well, with a download link????

  572. mike said:

    WOW, I finally got the download to work….

    now lets see if the link expires….

    and if i get an email…..
    well, no email from seller. but i do get the receipt from paypal…

    what now????anyone…..

    ps “I am going to write some instructions for all of those who have trouble, as soon as i get this to fully work.

  573. tommy said:

    anyone got an idea on how to protect the downloads with an htacces file with this script? Or any php script that can be added to protect the downloads? Even the downloads location can`t be guessed, it still can be found by the ones who know how to search…

    any help on this would be great

  574. Mike said:

    OK, So I have figured out the download bit, the links, the setting for paypal, the permissions…..for the download….BUT , I do NOT get an email with a download link, am I suppose to get one? I thought I was. And why not, is it in the settings php file, were it says name-domain name????/ I have tried all sorts of things….is it something else….
    HELP!…..I am almost there,

    Oh and the htaccess idea. maybe zip files with password, contained in email(if email ever gets there) ???

  575. Tim said:

    I purchased this script over a year ago and it has worked good for a couple products until I just tried to use it for another product. I get the oft mentioned “Purchase Details Not Found” warning on the Download page. The permissions are ok (I can watch the file being added in my ftp client even before “return to merchant” is clicked), but when the return to merchant paypal link is clicked, the Thank You page is not populated with data and the link leads to the warning.

    The email is sent and the link there will go directly to the download page. Did paypal change something? Should “auto return be on or should the customer have to click the link? The message about it about is unclear,

    (I found that the Thank You Page would now work if you have Auto Return turned on in your Paypal Profile. You need to turn it off, or have it disabled)

    Should “now work” be “not work”?

    Any ideas?

  576. Kidino said:

    Yes, I believe Paypal did change. Previously Paypal send along data of your customer’s purchase back to the script when they click the “Return to Merchant” — but it seems that Paypal doesn’t do that anymore. I thinking of a way to fix this.

  577. Kidino said:

    But it’s rather difficult since we are not using any database. Are you (all of you) open to the idea of using a MySQL database in the next version?

  578. Tim said:

    Yes, I’m willing to use a database, but I would like to have a workaround for this until that is available.

    If the Thank You page just informed the purchaser that they need to get the download from their email, that would be better than them seeing an error page. Error page make the product look bad.

  579. Tim said:

    I removed the link from my “Thank You” pages and made it clear to the user that the link would come in their email. This will do until you get this issue resolved.


  580. Mike said:

    is this what you guys are after?

    To store payment details in the database a payments table must be created in your database. The following MYSQL code will create a payments table.
    view source
    1 CREATE TABLE IF NOT EXISTS `payments` (
    2 `id` int(6) NOT NULL AUTO_INCREMENT,
    3 `txnid` varchar(20) NOT NULL,
    4 `payment_amount` decimal(7,2) NOT NULL,
    5 `payment_status` varchar(25) NOT NULL,
    6 `itemid` varchar(25) NOT NULL,
    7 `createdtime` datetime NOT NULL,
    8 PRIMARY KEY (`id`)

  581. Matthew said:

    I actually just picked up this script today and am having a similar problem that lots of other people seem to be having, namely that the script works fine up right up until the buyer clicks the file download link, at which point I get the “transaction details not found” error.

    I’ve gone through this thread top to bottom, and none of the proposed solutions have worked. I’ve checked, double checked and triple checked the settings.php as well as various details about the IPN and other files over and over, to no avail.

    After looking through Paypal I’m wondering if it’s as simple as having IPN Notifications turned on, and having a notify URL in place?

    It really is a pain because I can’t find any other sources for this script that aren’t extortionately expensives or really difficult to understand. I would be more than happy to send over $20 or so… if it were working. As it isn’t, I won’t be doing that.

    Hope for a fix soon!

  582. Mike said:

    Matthew, hey, so I can help. First off, the only thing I did in paypal was turn on ipn notifications and sent it to my domain name. That should get paypal and your web hosting site talking. Second, can you make a payment? The script has to be in run mode, and 1 dollar minimum. Then what happens, does the paypal page redirect itself to the thank you page, created for you by simple ipn or do you have to click a link??? Then do you get redirected to the download page created by simple ipn. Via a link on the thank you page???
    Stay with me, if you get this far, good, then when you click the download link, from within the download page( created by simpleipn) is this when you get the error? What error message. It’s in the location you specified in the settings php. It’s not clearly stated how to set that( creater of simpleipn assumes you know about how higherarchy of HTML works) just put the file in the same folder as all the other php files and ( thinking, doing this from iPhone as well…) … Don’t use any ../ stuff. And get the names all the same at first to simply things for now. Try that.

  583. Matthew said:

    Hi Mike,

    Thanks for the quick reply! I wasn’t expecting anything for a while, so it’s a pleasant surprise.

    I ran debug mode on the script and – when clicking the download link after performing a transaction – all of the information you’d expect is sent back. There doesn’t seem to be a problem with the IPN, is what I’m saying. I can paste a dump of this if needed?

    To answer your question: I’ve tested it using live (actual) Paypal accounts. Payments are made successfully, yes. Here’s a run down of the process:

    1) Go to the ipn.php?buy page.
    2) Get taken to Paypal.
    3) Enter details, hit “Pay Now”.
    4) Paypal returns to “you just completed your payment,” and gives Transaction ID etc.
    5) I hit the “Return to Seller” button (as it doesn’t do it automatically)
    6) Paypal loads “Thanks for your order” page.
    7) After a few seconds the “Thank You” page loads (complete with all of the info you’d expect).
    8) I click “Click here to proceed to the download page.”
    9) Site returns “Purchase Details Not Found. Contact Administrator.” error

    So as you can see, everything up to the last step seems to work perfectly. I don’t get to the actual download page; the error is generated when the script generates the download page. I’m suspecting that maybe that’s where it’s failing. That something is preventing it from generating the download page, and that’s where the problem is. It seems to be that many, many people have suffered from this problem. There’s some vague comments about file permissions, which are then dismissed with as vague comments about other problem areas. I’m at wits end :P

    And following your method didn’t fix the error.

  584. Matthew said:

    Oh and I should add that it doesn’t send emails at all. Maybe that’s something to do with my host. I haven’t checked, to be honest, as it’s the least of my concerns.

  585. Mike said:

    Ah, yes. I forgot to say. I set all permissions of all the files to 755. ( all the simple ipn files that is. ) thats so they can create a file when you click on the download, but your stuck just before that. So, …
    I get a message when my thank you page comes up, I just click ok. … Let me get on laptop and check this out…. BB…

  586. Matthew said:

    I did set all permissions to 755, but that didn’t help matter at all. In fact I believe it broke the script. Sadly my host seems to be down at the moment, but I will attempt to try this again later on.

    Let me know if you have any ideas; I’m in desperate need to get this script working.

  587. Mike said:

    ok, so heres what my web hosting just sent me….

    The problem seems to be in the functions.php file with this code:

    $mailHeader = “From: “. ‘”‘. $email_data['from_email_name'] .’” ‘ .”\r\n”;

    Our servers are very strict when checking the “From: ” email address header. This should not be set to a variable in a form (which could end up in a resulting bogus “From: ” email address header. This should be set to an email address which exists inside cPanel –> Mail –> Email Accounts.
    Please inform your php scripting guy of this so that he may make the correct changes to the code.
    Thank you,
    Level II Site/Script Compatibility

    guess i’ll have to try and fix this?

  588. Kidino said:

    you can update the from email value in settings by updating $support_email_address

  589. Mike said:

    Kidino, thx for the fast reply, but I have set the settings php support email address appropriately. as you specify. But no luck with it working. So, I’m at a loss.

  590. master said:

    I need help?
    I activated your ipn.php. script, but can not seem to send email to the customer who is in settings.php. How I got the mail that should be sent to the customer is located in the bottom of the settings.php script. In sendbox mail I get mail about the transaction and the removal of money but I do not get the desired mail from your script.

  591. Mike said:

    Hey Mate,
    Ya, its not working…not sure how many new people have found this and tried it, and found it doesnt send email.

    ? 4 u, does the costumer have to click on the link to go to the download page as well? or is it automatic for the costumer, for you. and if you dont know what i mean, send me an email. maybe we can work this out together. I might not have much time, ( as I havent tried what my isp told me to do yet) above! ….

    anyway, i’ll post my findings, just be patient, I know, i wanted this shit to work right away too, but to NO avail!!!

  592. superrider said:

    I found a great article while googling, i recommend it.

  593. carleton80 said:

    See the website above for a working example. On a shared host the email problem is likely caused by the fifth parameter in the PHP mail function. Open the functions.php file and look for a line like this towards the bottom.
    if ($mailResult = mail($mailTo,$mailSubject,$mailBody,$mailHeader)) { return “Send Email OK\n”; }
    The line in your file will look slightly different. Cut and past the above and it should send mail. Also, your directory needs to be writable, probably 777, so that the script can record the purchase and download info.

  594. carleton80 said:

    Click my name in this post or the one above for the working example. Click the link to be taken to PayPal

  595. usama said:

    world of warcraft hints is a Massively Multiplayer Game on The Web.

  596. bob said:

    anyone figure out what the problem with this script is?
    with sandbox i can never get past the end with the download link that doesnt work…
    “purchase details not found. contact administrator “

  597. Mike said:

    Bob. Don’t use sandbox. You gotta try it in active mode and use amount 1 dollar, set up 2 accounts. Or a friend, and try that way. I used 2 accounts and refunded. I got the download page to work, but never got the sent email to work. Or the auto page. I’m on my iPhone, but I found another script, but couldn’t get that one to work either. How can this be that difficult!

  598. carleton80 said:

    Bob. Sandbox can work but a live account may be easier. See my note above about the fifth parameter in the PHP mail function. I think this is what causes the email errors for most users.

    I’ve been experiencing the same message above recently but the email link works fine. Let me know if anyone has a solution to that one.

    OpenCart is a good opensource alternative for multiple digital downloads but also requires some trial and error to get the PayPal connection to work correctly.

  599. bob said:

    I really don’t care if the email doesn’t get sent.i guess I’ll try it the way I’m using it on a wamp server .if you say the download link will work live.i guess i don’t have an issue.thanks for the help

  600. bob said:

    WELL,i tried it on my site took my money and the download link still says (purchase information not found, please contact administrator) even waited for a few minutes and refreshed the browser.still no go.the Paypal account for my site is new, and Paypal holds thefundsfor days.could this be related to my issue, because the purchase is pending? My host is godaddy I’m hosting the script on a wamp server on my PC because of the lake of spaces

  601. Kidino said:

    It will definitely now work on your localhost computer machine.

  602. bob said:

    let me be a bit clearer on my intentions
    1) i have a website hosted by godaddy.that i want to use this script for a product im selling.on the site. but i have no room for the files

    2) i have a localhost windows pc with its own… a wamp server, with php4
    3) id like to point the buy button from site A to site B (that is hosting the script +product files) ie

    4) the user will click the buynow button then be transfered to site b where all the magic will happen

    this should be possable right?
    so the problem im having is that the script works well, redirecting to palpal, letting them make the purchase.untill it returns to the page
    then the script returns this error:
    “Purchase Details Not Found. Contact Administrator”.
    in the settings.php file i left everything to default accept the my paypal email address/and the support email address.

    my /www/ directory and all the files are writealbe
    i veryifyed with this php code:

    im at a loss, mybe the fopen function is not using the right syntax
    any help would be welcomed, thanks for your time.

    p.s :
    @Kidino and everyone who helped with this project.great work on the script, and thank you for making this available for all of us to use. just want to make it work in my

  603. Tim said:

    Hi Kidino,
    Thanks for the great script. I’ve been using it for over a year now and the only hiccup has been the “payment details not found” error with corrects itself in about 5 mins after payment. Not a big deal to me to debug.

    Two quick questions if I may:

    1. Recently I received a notice from PayPal “Action Required before February 1, 2013 Merchants need to update their IPN and/or PDT scripts to use HTTP 1.1, and include the “Host” header in the IPN postback script.” They offered sample code so I modified my ipn.php lines 92-96 to

    // post back to PayPal system to validate
    $header .= “POST /cgi-bin/webscr HTTP/1.1\r\n”;
    $header .= “Content-Type: application/x-www-form-urlencoded\r\n”;
    $header .= “Content-Length: ” . strlen($req) . “\r\n\r\n”;
    $header .= “Host: ‘\r\n’”;

    Please confirm this will keep the script compliant and consider updating the download.

    2. I noticed the script uses unsecure ipn url
    $paypal_ipn_url = “”;
    $fp = fsockopen ($paypal_ipn_url, 80, $errno, $errstr, 30);

    Would you consider updating the script to use SSL such that
    $paypal_ipn_url = “ssl://”;
    $fp = fsockopen (‘ssl://’, 443, $errno, $errstr, 30);

    I am not confident enough in my PHP or IPN understanding to implement this on my own.

  604. lrq3000 said:

    The script seems to be not working anymore. It seems to be coming from the verification check (where the ipn.php contacts paypal to check the post data), because it returns nothing.

    I’ve found an alternative script that works here:

    Then I get a response, but it’s always INVALID, so I think Paypal has changed a bit too much.

    Thank’s anyway for this script and for the uploadnsell initiative, that’s a great idea and hope it will prosper.

  605. Alexandru Dicu said:

    The script works fine. For this script to work, you should disable IPN from your PayPal account preferences. This script uses different calls to PayPal IPN system. If the IPN is enabled in your account, this script will not work.

  606. Nathan said:

    Hi Kidino,

    I’m new to this stuff and i’m getting this error. Can anyone advise me as to what to do from here?

    Notice: Undefined variable: debug in C:\xampp\htdocs\iffy\payment\basic\TMP0001\ipn.php on line 23

    Notice: Undefined variable: debug in C:\xampp\htdocs\iffy\payment\basic\TMP0001\ipn.php on line 39

    Notice: Undefined variable: debug in C:\xampp\htdocs\iffy\payment\basic\TMP0001\ipn.php on line 47

    Notice: Undefined variable: debug in C:\xampp\htdocs\iffy\payment\basic\TMP0001\ipn.php on line 56

    Any help would be much appreciated.

  607. carleton80 said:

    lrq300 — the script on stackoverflow uses the eregi() function that will cause future problems with PHP 5. Take a look at for a good tutorial on navigating Paypal. I ended up writing my own script based on some of the material I found there after running into problems with this script. Also, some issues appear to be related to folder and file permissions. Be sure your server (www-data) in Ubuntu has write permissions to your IPN folder otherwise the download data won’t be captured.

  608. lrq3000 said:

    First I would like to emphasize the fact that I am a very experienced developper in many languages and know PHP since 10 years or so, and already implemented a lot of payment interfaces with banks, and once or twice with paypal in the past (a few years ago).

    I’ve finally tried to implement my own IPN system using the Micah Carrick library here:

    But it still doesn’t work. And you know what? I even tried to use the IPN simulator in Paypal Sandbox: the script is NEVER even called. And before you ask: yes it’s on an accessible web server. And I even tried multiple web servers: same deal.

    I stumbled accross a few other things, the most interesting ones:

    This one shows a few things that should be modified in simple-ipn to be compatible in the future with paypal (namely “NOTIFYURL is deprecated since version 63.0. Use PAYMENTREQUEST_0_NOTIFYURL instead. ” and also using in sandbox mode).

    Also some people said that you need to configure Instant Payment Notification settings inside the sandbox profile (NOT in your standard paypal profile), by logging into your sandbox at, then going to Test Accounts > button Enter Sandbox Test Site.

    Anyway none of these worked any better, and I couldn’t even access the IPN settings inside the sandbox profile (with one sandbox account, there are only options of a buyer, not any of sellers! and then I’ve created a second account, but then the Sandbox Test Site wouldn’t even log me in, there is no profile at all).

    At last I’ve found a few other links:

    So in the end, it seems the PayPal IPN (sandbox or live) is a HUGE FAIL, it can stop working or change its implementation specifications at ANY moment and WITHOUT logical reason.

    I’ve ended up using which is a great service except that there’s no settings, but it’s already far better than any other I could find on the web such as…

  609. lrq3000 said:

    Forgot to reply:

    @alexandre-dicu: Ok, my IPN is already disabled and never was enabled (already read the comments here prior to do anything). It just doesn’t work.

    @carleton80: read the comments there, there are a few things to fix in that script that are already said in the comments in stackoverflow and everything is ok then, the replacement of eregi() by preg_replace() included.

  610. lrq3000 said:
  611. lrq3000 said:

    Also, another code I’ve found that could enhance simple-ipn a lot and simplify it at the same time:

    $verify_url = ‘’ . http_build_query( $_POST );

    if( !strstr( file_get_contents( $verify_url ), ‘VERIFIED’ ) ) return false;


  612. carleton80 said:

    lrq3000: I set up a (hopefully) working demo at healthanalyticacom based on the Micah Carrick tutorial. Go ahead and give it a try and I’ll refund your 98 cents. It was a little tricky getting the settings right but might be worth the effort if you’ve got a large volume you want to serve yourself. The site’s kind of cheesy, for demo only, but I’ll leave it up for awhile.

  613. Tim said:

    This script works fine. I sell my product with it daily. Sandbox feature does not work. To test, simply set your product to $1, go live, and test with a friends paypal account.

  614. Matthew Colins said:

    Just wanted to say that the script works, but may need some alterations later on down the road.

    Testing through “freinds” is inadvisable, as it has the risk of flagging your account for spam (which can get you locked out). It’s also not a good idea using this script for large scale solutions.

    I’m working on updating it, but the solution I have in place will be a MySQL solution and will require a table/db to function, so will require a DB. If people are interested, I’d be happy to share?



  615. Tim said:

    A mysql database backend would be nice as it would easily integrate with an email list and password protection subdirectories.

  616. Paul_B said:

    Got this running without problems (you just have to be careful with your keyboard in PHP!)

    However, I can’t see there is anyway to limit the number of downloads. This can be done by time, but clicking the download link multiple times results in multiple downloads.

    I realize a customer can simply copy the download file, but m limiting the downloads to say 2 would make it all look more professional…

  617. mike said:

    what hosting firm are you using, I think it may be some set up on my blue host account, thats why i cant get this to work… they are not very helpful either, but cheap they are….

  618. nic said:

    Hey is the download link down im unable to download the files?

  619. mike said:

    I have something better and easier…let me upload to my site, get a link going …..and i’ll repost here….

  620. J said:

    The download link,, doesn’t seem to be working at the moment. Is there a mirror or some other way of download this script?

  621. Frank said:

    Hear is a new rapid share link. someone please check for me.!

  622. Frank said:

    By the way, I am sorry, This link is not simple ipn, Its something better and easier…


  623. Frank said:


  624. JoeCool said:

    Frank, the script works flawlessly. Excellent. 10x better than SimpleIPN.

  625. tommy said:

    frank or joecool can you help me. I`m trying to get it to work. I get the email but not the downloadpage. I checked everything and everything seems to be correct. I got a server where my site is in a www_root folder. Please help :) tommyvandrie at gmail dot com

  626. tommy said:

    I also cannot use the testform in linklok

  627. Alexandru said:

    PayPal announced that they plan to discontinue support for HTTP 1.0 protocol starting October 7, 2013. Will the script work after this date with the new format ? Or what can we update in it to make it work ? Thank you.

  628. Kevin said:

    Does anyone have a working copy of this that I can get? None of the links are working anymore. Does this script still work? It is the only free thing I can find that should do exactly what I need it to do. Any other suggestions?

  629. frank said:

    hey, that link above works. its linklok, much better!!!

  630. Alexandru said:

    To support HTTP 1.1 and make the script work after 7 October 2013 you can update the file “ipn.php” with:

    $header .= “POST /cgi-bin/webscr HTTP/1.1\r\n”;
    $header .= “Content-Type: application/x-www-form-urlencoded\r\n”;
    $header .= “Host:\r\n”;
    $header .= “Content-Length: ” . strlen($req) . “\r\n”;
    $header .= “Connection: close\r\n\r\n”;
    $fp = fsockopen (‘ssl://’, 443, $errno, $errstr, 30);

    Also replace(in the same file):
    if (strcmp ($res), ‘VERIFIED’) == 0)


    if (strcmp (trim($res), ‘VERIFIED’) == 0)

    This will make the script to comply with the new requirements from PayPal.

    With welcome.

  631. Toure said:

    Could anyone email me a copy? the link is unavailable. Thanks

  632. Frank said:

    Toure, is the link above dead( for linklok)?Or are you looking for Simple ipn?

  633. Toure said:

    The link is dead. I am looking for the sample file in order to implement it with my wordpress site. I wanna set a digital download using paypal express checkout.

  634. Frank said:

    I don’t know what the ” sample file” is, but I’ll check and update a Dl link for linklok.

  635. Toure said:

    Thank you.

  636. Spike said:

    I have been using simple IPN on one of my client sites for a while now, and it only stopped working about 2 weeks ago.

    Now, everything seems to work until they click on the download link, and then it says “Purchase Details Not Found. Contact Administrator.” even though it shows purchase details on the previous “thank you” page.

    It also doesn’t send out the email as it used to.

    Any help on this would be greatly appreciated.

  637. laffo said:



  638. Howard Lee Harkness said:

    This script is over 5 years old, and Kidino no longer updates it because he’s not even in mini-website niche any more.

    There have been major changes in the PayPal IPN in those 5 years, and this script is no longer of much use. I’ve toyed with the idea of coming up with a replacement myself, but since it is possible to buy a working script for not much money, and my time is scarce, I probably won’t.

    I have corresponded with Kidino on several occasions. He is now working as a employee for a large company (still sort-of in the Internet Marketing niche). Apparently, his foray into mini-sites didn’t work out.

    In my opinion (I followed Kidino, along with several other folks that started out on an Internet marketing forum that has since gone dormant), Kidino made the mistake of trying to do everything himself. He’s a good programmer, and he had some good ideas, but he got so bogged down by not outsourcing anything that he missed the fact that the mini-site trend turned off into a completely different direction. What he was doing was Made-For-Adsense (MFA) sites (DuckDuckGo it*), which used to work really well, but don’t any more.

    Basically, he “bought himself a job” at which he eventually worked many more hours than he would have working as a regular employee — and I suspect it was for less money than he would have earned as a regular employee — or he would not have gone back to the corporate world. From my last email with Kidino, I draw the conclusion that he is doing very well in his new job, and has mostly lost interest in his former Internet marketing projects.

    (*) DuckDuckGo is my current favorite search engine because it returns more relevant results than Google (or Bing, although Bing is still better than Google).

  639. frank said:

    did you try the simple ipn?
    is that link, posted here, down?

  640. Larry said:

    I bought and installed the simple ipn years ago and it still works.

  641. Iszuddin Ismail said:

    Hello guys. Yes, like Howard said, I took up a job and a small ownership in a startup a few years ago. And I am still at that right now. Though, I am building something that does what Simple IPN does, and more.

    Is anybody interested to try this out?

    I will be selling this script later but if you are interested in trying it out, I’ll be glad to give you a complimentary copy.

  642. Steve K. said:

    I used Simple IPN a few years back and it worked great. I’m about to implement something that will need Simple IPN but I would be very happy to ‘test drive’ your new product.

  643. hi iszuddin said:

    hi I would like to try a copy of your new IPN offering if I can please regards Dave

  644. admin said:

    It’s been years. But I would like to introduce DIPPEC to you guys. Do check it out…

  645. J said:

    I wouldn’t bother with Simple IPN. Even if you somehow found a copy, most likely it hasn’t been updated in years.

    It just wasn’t worth my time to pursue this. I just bought a Paypal IPN script called LinkLOK and it works perfectly.

  646. Adam said:

    I ‘ve been using the old Simple IPN on my website in the past 4 years. It is still working.

  647. J said:


    I’m glad it’s working for you. How about you post a download link for people who are looking for it?

    And since it hasn’t been updated in years, if it doesn’t fail today, it’s only a matter of time before it fails.


  648. Adam said:

    The existing download URL from the top of this page works just fine. You have to modify the ipn.php like in the post of Alexandru from September 27th, 2013 at 4:44 am and it will work. It does for me. I can’t reupload something for which I am not the copyright holder. It’s all on this page.

  649. kidino said:

    Over the past few months, maybe a year ago, Simple IPN was open sourced and is available from

    Kidino also created DIPPEC is was released last week.

  650. kidino said:

    If Github is a bit too much for you, you can just download the ZIP from

  651. frank said:


    [*** link removed ***]


  652. admin said:

    I would advice against downloading and using scripts from unofficial sources. It may have been modified that opens up your website to vulnerability.

    Let me explain … a lot of websites distributes commercial wordpress theme for free now. But many of those themes have been tempered and contain malicious codes. For example, it may create an extra user that the attacker can login with and take control of your website.

    The same is possible with any PHP script. So make sure that you get your scripts and software from official sources.

  653. frank said:

    Just trying to help out. Sorry for that.
    you have a good point. loss to them, not me.

  654. J said:


    Do you see how many people were complaining about the download link? It wasn’t working for a very long time. Good thing the author updated it.

    Anyway, it’s up to you whether you want to rely on software that doesn’t appear to be supported. When users need to turn to forums for bug fixes, that’s not a good sign.


  655. admin said:

    Thanks for the input. How about I make you a deal? Just for the readers of this post. Write to with a message, “I am from” and I will send you a DIPPEC PHP Script for free for you to try out.

  656. Jonathan said:

    I really like Simple IPN – Thank you.
    Do we need to be concerned about this from PayPal:
    PayPal is upgrading the certificate for to SHA-256. This endpoint is also used by merchants using the Instant Payment Notification (IPN) product.

    This upgrade is scheduled for 30/9/2015; however, we may need to change this date on short notice to you to align to the industry security standard.

    You’re receiving this notification because you’ve been identified as a merchant who has used IPN endpoints within the past year. If you have not made the necessary changes, we urge you to do so right away to avoid a disruption of your service!
    Because these changes are technical in nature, we advise that you consult with your individuals responsible for your PayPal integration. They will be able to identify what, if any, changes are needed. Please share this email and the hyperlinks below with your technical contact for evaluation.
    Testing in the Sandbox is one of the best ways to make sure your integrations work. Sandbox endpoints have been upgraded to accept secure connections by the SHA-256 Certificates.
    Full technical details can be found in our Merchant Security System Upgrade Guide ( In addition, our 2015-2016 SSL Certificate Change microsite contains a schedule of our service upgrade plan (
    Thank you, Best wishes…

  657. Alexandru said:

    If your website uses SSL (https) you must update the existing G2 certificate (if exists) to a G5 VeriSign Root Certificate. You you use simple http then no action is required.

  658. Fabian said:

    Great script! i can say with sandbox NEVER works. To all people getting the same error.. try it LIVE and works perfect!

    I have a question.. if someone could do this…
    The script is prepared to add a product name with price, for Paypal payment, and then.. with arrays, add many different files to download.

    I need to add for example 10 different files, but each file paid separataly.. i mean.

    and when the user make the payment, get the download URL for EACH separate file.

    Can i explain fine?
    Sorry for my english ;)

  659. Jay said:

    I got this note from PayPal regarding the changes they are making soon:

    It says:

    “Update your code to use HTTPS when sending postback messages to PayPal”


    “The and endpoints only accept HTTPS connections. If you currently use, you should move to when you update your code to use HTTPS.”

    Do I need to make any changes to the SimpleIPN script? If so, what I need to change?

    Thank you very much for your help!

  660. Jay said:


    The script was working fine. For 5 years, I haven’t changed anything.

    Suddenly today I started receiving “Invalid Page request” after a customer returns from PayPal.

    It’s the same problem Francesco describes above. What might be suddenly causing this now? I haven’t made any changes to the script.

    Thanks for any help!

  661. Dino said:

    Sorry for the late response guys. I am looking into the matter and will update you guys soon.

  662. Jonathan said:

    PayPal is upgrading the certificate for to SHA-256. This endpoint is also used by merchants using the Instant Payment Notification (IPN) product.
    This upgrade is scheduled for 30/9/2015. You’re receiving this notification because you’ve been identified as a merchant who has used IPN endpoints within the past year. If you have not made the necessary changes, we urge you to do so right away to avoid a disruption of your service!
    Testing in the Sandbox is one of the best ways to make sure your integrations work. Sandbox endpoints have been upgraded to accept secure connections by the SHA-256 Certificates.
    Full technical details can be found in our Merchant Security System Upgrade Guide (…English%29.pdf). In addition, our 2015-2016 SSL Certificate Change microsite (…e&locale=en_US) contains a schedule of our service upgrade plan.

  663. Dino said:

    Alright. I have updated the script but I need you guys to help me test this. I have two different releases. One that fixes the current problem with Paypal IPN and new data structure. And the second is a pre-release that supports multiple products.

    Honestly, looking at this, I want to recode everything from scratch where the codes will be more structured. But the requires a lot more time and effort. So this is what I have for now.

    Fix current IPN issue

    Pre-release … alpha. Supports multiple product. But this version will not support old and current download pages. So do not install and overwrite existing installation of Simple IPN. Install in a new folder.

    If you tested these two, I would appreciate any feedbacks.

  664. byinteractive said:

    hello bro.. so in where we must change we email to recieve payment ?

    and have anything to change again ?


  665. Jonathan said:

    This is thank-you.php using v1.1:

    404 Not Found

    array(35) {
    string(20) “”
    string(13) “JX3UPMFPJP5M4″
    string(8) “VERIFIED”
    string(8) “Jonathan”
    string(8) “blahdeblah”
    string(17) “Jonathan blahdeblah”
    string(15) “69 blahdeblah”
    string(7) “blahdeblah”
    string(2) “GB”
    string(7) “ZY21WV”
    string(2) “GB”
    string(17) “2L128543T2625345S”
    string(3) “GBP”
    string(4) “0.10″
    string(4) “0.10″
    string(8) “ELIGIBLE”
    string(4) “0.10″
    string(4) “0.10″
    string(9) “Completed”
    string(7) “instant”
    string(4) “0.00″
    string(4) “0.00″
    string(4) “0.00″
    string(14) “Sample Product”
    string(6) “SPL101″
    string(1) “1″
    string(10) “web_accept”
    string(20) “2019-07-30T09:32:22Z”
    string(23) “”
    string(13) “FSAYSGYDYPG4W”
    string(11) “UNVERSIONED”
    string(56) “AorsmlWgQL17dVcBPS0k89ZZ6yKKAp8yPabaIybrtiq9AdT-DlpNe9zC”
    string(29) “fb.1.1556114730529.1490008981″
    string(30) “f9753fe-16c3d1793ef-46c578ed-4″
    string(36) “”

  666. Jonathan said:

    The Alpha works a treat – thank you. Has no one else looked at this great script since 2016???

  667. Alexandru said:

    Works great for me since 2010. Thank you.

Leave a Reply