(I have set this as a support request...not sure if it's a bug in the module)

Hi Alexis,

Great module idea.

I installed the 4.7 version on a test site and am unable to get it working.

I'm getting a bunch of errors at each step.

(a) unable to get the quickfile module to recognise a folder outside my drupal folder.
(I tried inserting a full absolute path on the server to my /quickfiles/ folder under ADMIN -> QUICKFILES. Only setting a subfolder off my Drupal folder would get the quickfiles module to 'accept' that on the submit quickfile node form)

(b) The download your file link on the thank you page returns an error message.
(an ACCESS DENIED error)

(c) The transaction process (I tried it using paypal) appeared to work, but the link sent in the email gives a page not found error

I'm guessing it has something to do with how I have setup the /quickfiles/ folder. do you have more documentation on the usage of quickfiles module?

Thanks

Phil

Comments

alexis’s picture

Hello, thank you for your message.

Please let me know what's your development environment. I've just made a few "purchases" in my Drupal 4.7 test site and worked normally.

a) The path to your quickfile is an absolute path in your system, for example something like:

/home/yourname/quickfiles

It's recommended that this be a folder outside your Drupal folder, which is public via your web server, that's the only way to protect your files.

b) Does the "Download your quickfile" is a link of the form:

http://example.com/quickfile/download/t/n

where "t" is your transaction id and "n" the node number of your quickfile? You can check it at your browser's status bar putting your mouse over the link.

There's no special access for that link, just a confirmation of a completed transaction and download status.

What payment processor are you using? Live or test mode?

c) Have you created a page with the url entered at "Thank you page URL"? Authorize and Paypal both redirect to that page after a succesful transaction.

You also need to activate a few things for your Paypal account to work with Quickfile:

  • At Profile > Website Payment Preferences: Auto Return On,
    Payment Data Transfer On.
  • Enter your Identity Token from Profile > Website Payment Preferences at admin/quickfile/paypal in Drupal.
  • At Profile > Instant Payment Notification Preferences: Instant Payment Notification On

Have you checked if the url in the notification email is the same as the thank your url (with transaction id and node number)? It should be the same.

Please let me know more details. I'll be glad to help.

Phillip Mc’s picture

Thanks Alexis. Appreciate the quick response.

I tried what you said and here's what's happening:

a) I can't set a quickfiles folder unless it's relative to my drupal folder. for example a path to a public folder outside my httpdocs is:

/home/httpd/vhosts/example.com/dloads/
or
/home/httpd/vhosts/example.com/httpdocs/dloads/

When I set the quickfile folder to that in my admin -> quickfiles I'm unable to submit a quickfile - I keep getting the error "the file does not exist". The file and folder permissions are 755.

When I set it to simply dloads (which is a dloads folder relative to my drupal folder) it works with the same file and the same folder permissions (755)

b) Using paypal (both live and sandbox gives the same results) when I try to make a dummy purchase (i.e. I setup a dummy download & price and actually pay for it using my paypal account) and the transaction is complete at the pay pal end, I'm returned to the thank-you page with a "Download your file" link which points to: http://www.example.com/drupal/quickfile/download//5

When I click on that link I get and error message:Access denied - You are not authorized to access this page.

All The email notificiations are sent and in the customer email, the link to download my file is: http://www.example.com/drupal/?q=thankyou?txnid=3&nid=5&linktype=email

When I click on that link, I get a Page not found error.

Finally,when logged in as the administrator, the transaction record appears as it should in ADMIN->QUICKFILES->TRANSACTIONS and when I click on the link to download the file there, I#m brought to the THANK YOU page and the the download link is: http://www.example.com/drupal/quickfile/download/5/5 and the link works.

I'm using paypal as the payment method, I've tried it both using sandbox and live to see if that works.

IPN is switched on. PDT token is correct. My site logs reports that the transaction has completed succesfully and PAYPAL bounces me back to the THANK YOU page as it should.

Using this version of the quickfile module // $Id: quickfile.module,v 1.1.2.4 2006/11/22 15:06:36 alexis Exp $

My development environment is

Type Apache 
Version 2.0.52 
PHP Interface: Module 

PHP 
--------
Version 4.4.4 
Magic Quotes GPC Off 
Magic Quotes Runtime Off 
Memory Limit 50M 
Register Globals Off 
Safe Mode Off 
Session Cache Limiter none 
Session Save Handler user 
Upload Max Filesize 2M 
Extensions 
CURL Support Enabled 
GD Version bundled (2.0.28 compatible) 
FreeType Support Enabled 
XML Support Enabled 
Zip Support Disabled 
Zlib Support Enabled 

Database 
-----------
Type MySQL 
Version 4.1.20-standard 
Charset utf8 
Collation utf8_general_ci 
Create Temporary Tables Disallowed 
Lock Tables Disallowed 

Appreciate any pointers....I can probably live without the private folder issue but if you have any ideas why the module it doesn't like, let me know.

thanks again for any assistance you can give.

Phil

Phillip Mc’s picture

sorry. just closing off that STRONG tag. a pity we can't edit these comments.

Phillip Mc’s picture

trying again. to switch off the bold tag.

Sorry

alexis’s picture

Hi, some ideas:

a) For your directory structure I guess you are using Plesk as control panel, take a look at your user permissions, maybe some parent folder doesn't have execute permission for the web server user and that's why Quickfile is not seeing files inside. I have tested with Fedora and CentOS boxes without using a control panel.

Have you tried in your local testing server?

Private downloads are needed for those who want to sell content and should be nice getting to know where the problem is. Do you have the same problem when trying to use the normal Drupal private location for your files?

b) Your Paypal transaction is not returning a transaction id, there should be a number between the two slashes at the end of http://www.example.com/drupal/quickfile/download//5 , 5 is the number of the node for the quickfile you created, it's a low number so I guess is an almost new site, is that right?

I see two "?" in the url of the confirmation email. I think the module is not working right without clean urls. Enable clean urls and test it again.

It seems that Paypal is sending you back to Drupal but PDT is not passing the data correctly, or at the right time. The data in the database, which you see listed in admin/quickfile/transactions, is created by Paypal IPN which is actually real time. I remember having that problem a few times and even added a comment about it around line 250 in hook_link:

    // for some reason $txnid is empty in link if not using the following line for Paypal
    $txnid = $txnid; 

Try removing those lines and let me know how it goes.

I will try to recreate the problem and find another work around.

If anybody has any idea about this PDT issue please let me know.

I have three sites using the module, one in Drupal 4.7 and two in Drupal 5, and have sold many ebooks via Paypal with the same version of the module you're using. It's a little weird.

Regards.

Phillip Mc’s picture

a) For your directory structure I guess you are using Plesk as control panel, take a look at your user permissions, maybe some parent folder doesn't have execute permission for the web server user and that's why Quickfile is not seeing files inside. I have tested with Fedora and CentOS boxes without using a control panel. Have you tried in your local testing server?
Private downloads are needed for those who want to sell content and should be nice getting to know where the problem is. Do you have the same problem when trying to use the normal Drupal private location for your files?

Yep, I'm using a plesk control panel.
Sorry but I'm not sure what you mean by a "local testing server."
Nope, I don't have the same problem using the normal drupal private location for files.
It only appears to work if the quickfiles folder is a subfolder from my drupal folder.
I'm going to leave the quickfile folder problem for the moment and tackle the actual transaction process. Worst case scenario is I can probably live with the folder issue if the transaction/download process works.

5 is the number of the node for the quickfile you created, it's a low number so I guess is an almost new site, is that right? I see two "?" in the url of the confirmation email. I think the module is not working right without clean urls. Enable clean urls and test it again. It seems that Paypal is sending you back to Drupal but PDT is not passing the data correctly, or at the right time. The data in the database, which you see listed in admin/quickfile/transactions, is created by Paypal IPN which is actually real time. I remember having that problem a few times and even added a comment about it around line 250 in hook_link: // for some reason $txnid is empty in link if not using the following line for Paypal $txnid = $txnid; Try removing those lines and let me know how it goes.

Yes, it is a new site. Drupal 4.7.4
Yes, I have a thank you page setup correctly.
I have tried it with clean urls. no success.
I have tried it after removing the lines you mentioned in the module.
The link on the THANK YOU PAGE is now: http://www.example.com/drupal/quickfile/download//

I have three sites using the module, one in Drupal 4.7 and two in Drupal 5, and have sold many ebooks via Paypal with the same version of the module you're using. It's a little weird.

Not sure if this helps or not, but, when I go to ADMINISTER -> QUICKFILES -> TRANSACTIONS all the test transactions are there.

If I look at the log files, TRANSACTION COMPLETE notices are there.

The transactions come back completed, marked as succesful, with the correct name and email address details. so, it appears as if the paypal IPN is working and sending back the customers details. Also, the link from the ADMINISTER -> TRANSACTION page brings me to the THANK YOU page and the download link works.

Do you think it's my server?

Phil

Phillip Mc’s picture

additional info:

not sure if this is relevant or not...but, when I go to ADMINISTER -> TRANSACTIONS and click on the EDIT link for a transaction, everything appears to be correct, apart from the Processor txnid: which is ZERO for all transactions.

All the other fields such as name, email, payment date, purchased downloads, downloads available, payment status (COMPLETE), quickfile, discount coupon, appear to be correctly filled out.

Which suggests that the PAYPAL IPN and token is bouncing back the right information, except for the txnid.

Does that make any sense or help?

Appreciate any pointers or assistance, Alexis. It's a great module...and I know I'm very close to getting it working...

thanks

Phil

alexis’s picture

Assigned: Unassigned » alexis

Hi, Paypal Sandbox should return a test transaction id in each transaction. Processor txnid, even in Paypal Sandbox, should be a mix of numbers and letters like 37W439682U7071238.

I'm guessing the problem is related to PDT processing but it's a little difficult to track if I can't recreate the problem. It should be helpful if we had reports from other users with similar problems.

By test server I mean another Linux server where you could install the module and see if it works correctly.

It would be helpful if you could attach a dump of your quickfile* tables to see what Paypal is reporting.

The directory permission issue is a little difficult to track without testing with a similar environment, I don't have access to a Plesk based server. I've tested with cPanel in one of my client's sites and he's sold already a few dozens of ebooks with no problem at all.

Right now I couldn't confirm if it's your server without working in similar one. I'll try to find the time to do so.

Dublin Drupaller’s picture

quick one. I just tried this module on a linux server with a plesk control panel and this is what happened:

- same folder problem that philk experienced.
- paypal payment works when LIVE, but, not when using the SANDBOX option. When sandbox was enabled, paypal wasn't sending back the processor_txnid, which, when you set it to live transactions, it does and looks something like this: 7S939496E6585221V

Phil: I recommend you double check the following items:

  1. log into your paypal account and click on PROFILE -> INSTANT PAYMENT NOTIFICATION PREFERENCES.
  2. Make sure your IPN link is (Clean URLS on) http://www.example.com/quickfile_paypal/ipn
  3. Click on PROFILE -> WEBSITE PAYMENT PREFERENCES
  4. Make sure your AUTO RETURN is switch on and the link is the same as the IPN link
  5. Scroll down for the Payment Data Transfer option. Make sure that is switched on. The first time you switch it on, you will be displayed a TOKEN which is a long list of letters and numbers. if you already have it switched on, paypal should display your Identity Token in a long line. Copy and paste that token into your paypal admin page for the quickfile module. The first time I copied it, it was running to two lines, so I missed a big part of it.

hopefully that will get you up and running. Great module, by the way.

Dub

Phillip Mc’s picture

Status: Active » Fixed

thanks Alexis + dubliner. I had muddled up my tokens (sandbox for live tokens). It works now!!!!!!

Whaahay!

Thanks guys.

I'll chase my host about the folder issue and post back up here if I find out why it's not working as it should.

Phil

alexis’s picture

Hey guys.

Dublin, the IPN url at Paypal -> PROFILE -> INSTANT PAYMENT NOTIFICATION PREFERENCES is not used by Quickfile, which sends its own IPN url (notify_url parameter), the same happens with the return url (return parameter).

PhilK, I'm glad it worked for you. Let us know about the folder issue, I know Dublin is also working on it. Some live urls when you have it all set up would be great :)

Cheers.

Phillip Mc’s picture

Just thought I'd post a message on here about the folder issue which is now solved. Dublin Drupaller spotted that I was using the wrong absolute link.

instead of this:

/home/httpd/vhosts/example.com/httpdocs/dloads/

I should have been using this:

/var/www/vhosts/example.com/httpdocs/dloads

this may not apply to all server configurations. I'm using a plesk desk control panel to manage my domain hosting, so, the thing is to check that the ABSOLUTE path is correct when setting up the private downloads folder for QUICKFILES under ADMIN -> QUICKFILES.

this module rocks!

Phil

alexis’s picture

Great. Nice to see you got it working :)

Cheers!

dhw1179’s picture

Was it ever determined what was causing the link from the PayPal site back to the host site to not have the correctly linked URL to download the file just purchased? Like it was mentioned above, I am getting http://www.example.com/drupal/quickfile/download// lacking the transaction number and node number. There are no problems with the link sent in the email. I had noted the problem in Sandbox mode and was hoping that it would fix itself when live (wishful thinking I know). Any help?

alexis’s picture

Please re-read the comments and redo you steps in Paypal. You may be missing one step.

Did you enter the correct token? That was one Phil's problems.

dhw1179’s picture

I just confirmed all my settings on the PayPal site and in the quickfile>paypal settings. Still getting a dead link upon being returned to my site after completing a purchase. No problems with the email link.

Phillip Mc’s picture

HI Dhw.

Just thought I'd jump in and try and help out...I managed to get the module working by backtracking and double checking everything Alexis put in the readme and said here.

however, I do notice that firefox seems to have a problem when paypal bounces the customer back to the download page. IE seems to work okay, but, firefox gave me the empty download link you're getting.

Can you try and REFRESH that page you're getting when paypal is bouncing you back (which, incidentally means the module is working) to the quickfile page?

I haven't got a chance to go back to that, but, I remember thinking it was a firefox cache problem.

Phil

alexis’s picture

I don't think Firefox is the problem here. Many of my clients use Firefox and they've been able to buy many ebooks from my sites using Paypal.

It's a little difficult to track this issue but I saw it happening a few times until I added a "echo" or "print" command, outputting anything before the download link. Finally I noticed that just asigning a variable to itself made the problem disappear.

Try printing something before the download link in your thank you page, for example: print 'test', and let us know.

Regards!

Phillip Mc’s picture

Hi Alexis,

that worked for me (adding in <?print "test"; ?> on the thank you page and selecting the php filter.

I was going to suggest (and I can help if you want) compiling a brief "Troubleshooting quickfiles.module" for the readme/install.txt to go with the module from this thread.

e.g.

1. FILE DOES NOT EXIST error when submitting a new quickfile node.

This means that the module can't find the file you are putting up for sale.

Common causes for this error are;

(a) The absolute path you have indicated under ADMIN -> QUICKFILES is incorrect. Double check with your host to what your absolute path is. 

(b) Double check with you have setup the folder correctly and with the correct permissions.

And so on...I can help pull together the problems & solutions I had if you think it's worth doing. Bottom line is that the problems I had weren't really module issues and could be covered in the readme.txt.

Phil

alexis’s picture

Hi Phil, that would be great, some kind of FAQ.

You can send me the information using my contact form and I'll add it to the README.

Regards.

Chill35’s picture

Hi please help me.

I too get a File does not exist message.

I am testing locally : http://localhost/

My web root computer path is f:/htdocs/

In that folder I have my Drupal folder and another folder 'PrivateFiles'.

The path I give in the quickfile settings is : /PrivateFiles

Then I write for the quickfile when creating it : document.pdf

document.pdf is in /PrivateFiles

I use Private Download. My Drupal File System is : files

What am I doing wrong ?

Phillip Mc’s picture

quick guess: go to ADMIN -> QUICKFILES and change the absolute path to :


f:/htdocs/dloads/

create a /dloads/ folder under your /htdocs/ folder and copy the quickfiles in there.

note: Quickfiles works independently of the normal Drupal file handling system, which allows you to FTP your private files up to a secured folder.

note to alexis: It might be an idea to start a forum thread "troubleshooting the quickfiles.module" so people can discuss on there instead of using the issues cue. You can insert an A HREF link across to that forum post on the project page, to avoid this issue (which is correctly marked as fixed) being never ending.

Phil

Phillip Mc’s picture

Sorry, my post was chopped off there.

What I meant to say was

  1. go to ADMIN -> QUICKFILES and change the absolute path to :
    f:/htdocs/dloads/
    
  2. create a /dloads/ folder under your htdocs folder and copy your quickfiles in there

Note: Quickfiles doesn't use the normal Drupal file handling stuff, like the /files/ folder. It allows you to specify a completely different folder and FTP the quickfiles into.

note to alexis: It might be an idea to create a forum topic called "troubleshooting the quickfiles module" to take discussions out of the module issues cue. It will help avoid this issue (which is correctly marked as fixed) being a never ending issue.

Phil

rtdean93’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

I am having similar trouble.

I can pay via paypal, but the IPN is not communicating back to my site and my links to the download are not working.

Questions...

What should be my IPN Url? Currently it is http://www.gignetsolutions.com/quickfile_paypal/ipn

Just uploaded tge latest CVS files and still no luck.

Any help i appreciated.

Phillip Mc’s picture

Hi Guys.

I've moved this discussion to the following forum topic:

http://drupal.org/node/103623

It should be easier to discuss and keep track of setup issues & discussions there rather than adding to this closed issue.

alexis’s picture

Status: Fixed » Closed (fixed)

Yep, closing this issue now.

You can follow the issue related to Paypal in this issue.