File download issues

Posts: 23
Joined: 11/01/2007

Hi, everyone,

I'm using Drupal 5.5 and recently updated to 5.x-1.0-beta7. Since the update, I've had intermittent problems with the file download function. The customer pays through PayPal but doesn't have access to the file download. I'm hoping that I'm just missing a step somewhere, although it is curious that the problem arose only with purchases in the last few days.

My settings:

Under admin/store/settings/products/edit/features, Order Status is set to "Payment Received."

Under admin/build/workflow-ng/uc_payment_received, the condition "Check order status" is set to "Balance is less than or equal to $0.00." and the "Update order status" is set to "Payment Received."

On the individual product, the Features tab has this configuration: "File download
SKU: MM-EBOOK
File: mouse-map-2008-copyrighted.pdf
Shippable: No"

Here are the order details for a couple of samples:
Order 70

03/30/2008
6:42:32 PM - User can now download the file mouse-map-2008-copyrighted.pdf
03/30/2008
6:42:33 PM - PayPal IPN reported a payment of 7.95 USD.

Order 71

04/02/2008
10:35:39 AM - PayPal IPN reported a payment of 4.95 USD.
04/02/2008
10:35:42 AM - Order created through website.

I'm sure that I'm just missing a setting somewhere. I've been through all of the instructions many times, but can't figure out what I'm doing wrong.

Thanks for your guidance,
Anne

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Were both of those orders for the same product? It looks to me, at first glance, that you don't have the one product setup correctly (that is, if they aren't for the same thing). I would double-check the SKU settings for that particular File Download feature.

The orders that didn't get the products added correctly - did they ever get moved to Payment received, or did they stay in Pending?

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 23
Joined: 11/01/2007

The orders that didn't get the file downloaded added correctly were moved to Payment Received.

The samples I listed are two different products, but they are set up exactly the same. And both products have experienced the same problem.

I will have some time today to carefully go through the steps again and make sure the settings are proper. I'll be following the instructions here: http://www.ubercart.org/docs/user/3345/selling_files.

Thanks,
Anne

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

The weird thing is, I had this issue too - but didn't realize until now. I'm not sure if it's PayPal-related or what. My hunch is "no" because the IPN WAS reported, but the user's files did not get added to their account. The strangest thing is, we had another PayPal order come in this morning (half an hour ago) and it went through without a hitch.

Confusion remains...

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 23
Joined: 11/01/2007

torgosPizza wrote:
The weird thing is, I had this issue too - but didn't realize until now. I'm not sure if it's PayPal-related or what. My hunch is "no" because the IPN WAS reported, but the user's files did not get added to their account. The strangest thing is, we had another PayPal order come in this morning (half an hour ago) and it went through without a hitch.

Confusion remains...

Welcome to my world... LOL!

I'll keep looking. It seems like perhaps a setting got lost in the upgrade to Beta 7. It might just be a matter of finding it. I'm thinking of rebuilding all of the products, which wouldn't be too difficult to me because I only have three downloadable products.

Anne

Posts: 23
Joined: 11/01/2007

Well, I've got it working.

I changed the File Download Settings (admin/store/settings/products/edit/features) so that the Order Status is now Completed. I also changed the Workflow-ng configuration "Update order status on full payment" now updates to Completed when the balance is less than or equal to $0.

Previously both were set to Payment Received, which (it seems to me) should have worked. But this will work for now. I'd be interested in hearing from anyone with any similar experiences using the file download feature. Let me know if there is some detail of my settings that I haven't listed here that would help with the troubleshooting.

Happy day,
Anne

Posts: 23
Joined: 11/01/2007

Well, folks, another sale this morning that didn't get the file download automatically added to his user account. It took me a while to figure out how to get it working, but I think I have it figured out.

The customer's story:
1. The user submitted the order, went to PayPal, made the payment, which was processed properly.
2. Ubercart processed the payment and, per the configuration, changed the order to completed.
3. The user received the invoice, his new user account information, but the download was not added to his account and he did not receive the download link message.
4. The user emailed me asking for help! Smiling

What I did next:
1. I started to pull my hair out, but figured that wouldn't help. Then I started to switch back to the other download manager I used to use, but don't like having to custom format all of the pages. So I decided to try one more time to figure this out.

2. I reviewed the Selling Files guide in the User Guide (http://www.ubercart.org/docs/user/3345/selling_files) and double-checked that all of my settings were correct. They were. FYI, I had all of my download products are set to be available when the transaction is Complete, and the Workflow-ng was set to update the order to Completed when the when the Balance is <= $0.

3. I went back to the order record for this transaction, changed the order status from Completed to Payment received, then back to Completed. Voila! The status now said "User can now download the file ez-fun-guide-2008-copyrighted.pdf."

4. I decided to reconfigure Workflow-ng. I changed it to update the order status to Payment received when the Balance is <= $0, then I added a new Configuration that updates the Order status to Completed after the Order status is updated to Payment received.

5. I logged out and completed an order as a completely new user. The payment was processed, posted properly by PayPal, the file download was added to the new account, and all of the proper email messages were sent.

Now, it would be nice to know why it's working this way -- or rather if it is supposed to work this way. If it is supposed to work this way, it would be helpful to have some more documentation about the Workflow-ng set up. If it would help others, I am happy to post my experience on this topic but I'd certainly want someone more expert than I am to review it.

Thanks,
Anne

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Thanks a lot for sticking through with it and figuring that out. I'm curious... what version of Workflow-ng are you running? Also, is this only failing for anonymous users? I see in the file module that it won't add files to orders that don't have a uid, though I'm not sure this should matter.

To be honest, in terms of best practice, I think I'd rather see an order progress through the statuses like this anyways so it's really clear to the customer and administrator what's going on. That said, I don't think it should be a requirement, so there's gotta be a bug or incompatibility lurking in here somewhere. Evil

Posts: 23
Joined: 11/01/2007

I'm using version 5.x-1.3 of Workflow-ng.

My husband just did a test order and didn't even fill out the user account information on the checkout page (left it to ubercart to fill in; my, isn't he a typical customer!). Everything processed perfectly. Payment received and status updated in sequence apparently, file downloaded added, all email sent properly - ubercart receipt, new user account info, file download link.

Hopefully, this fix will stick. It is interesting to the non-techie like me to consider the sequence of all of these events. I can see while the file module won't add files to orders without a uid, because the file download is added to the user account -- No user id, no account to link to. How you all get all this to work is magic to me!

Anne

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

anneeasterling wrote:
How you all get all this to work is magic to me!

Hah! Me, too. Laughing out loud

Honestly, it helps to have people like you sticking it out to point out inconsistencies and help refine the processes. torgosPizza played a large part in early use and testing on these features, too. Smiling

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Smiling Always glad to help. But I gotta say I haven't really had any issues with downloads being activated; the only issues I ever really experience almost always have to do with PayPal.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 23
Joined: 11/01/2007

torgosPizza,

Do you use PayPal Standard or Pro? I'm using Standard and wonder if upgrading to Pro would eliminate some of these issues.

Anne

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Yeah we use standard and I've considered moving to Payflow, but I do believe there are fees involved - just not sure how much yet. Unfortunately I do know that PFP gets affected by some of PayPal's updates, but I get the feeling it's usually far less. You can read some more about how often they have maintenance at www.paypaldeveloper.com - that's where I go whenever people begin to email me about their PayPal orders. It has live site status feeds and things to advise you on what's going on.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 8
Joined: 05/20/2008

anneeasterling,

I have just set up the module, and have been having the same problem you talk about. Your fix did not help me, but I notice if I edit the order as you did and change the status, i can get the downloadabiliy. I tried aded the extra work flow config you did, but that is not helping, and this time the status stayed at pending nor payment received... your text has helped and at least made me feel the problem is fixable. I feel so close. I know next to notthing about workflow, but the key seeems there.

One thought. notice me small screen snap attached...

notice that the payment is received from paypal BEFORE the order is created through web site. It is only seconds before, but could the fact that the payment is recorded BEFORE the order is created mess up the work flow state changes?

any more info people can supply about how to fix this problem would be helpful. I would love to go live. At this point it seems I can edit the order by hand, and force the download ability, but after the millions of orders start flowing in... that will be a real drag. Smiling Would love to get it so that people can place an order, pay, and download while I sleep. so I might way a day to see if anyone response to this for future advice.

Cheers! Ricco

AttachmentSize
Picture 2.png13.9 KB
Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

I thought I had a comment on here about the order of things happening during checkout.

Basically, it's possible for payments to be received before a user account is created. So, to automate file download and role permission purchases, they shouldn't get the "completed" order status until the "checkout complete" event is triggered.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

I've probably mentioned before but we had issues with Files not getting added to a user account if I only used the Event "Customer completes checkout" to move the order to completed - because the PayPal IPN can come minutes or even hours after the order has been completed, and the user account created. To solve this I made the Workflow configuration happen when "A payment is entered for an order." That fixed things up nicely.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 5
Joined: 02/26/2008

Please help me understand your comment. My File Downloads are not being automatically enabled upon Payment Received from PayPal. What sort of configuration should I add to Workflow-ng to move the order from Payment Received to Complete...thus triggering the download(s)?

I did add a configuration that tests if Order Status == Payment Received, then change Order Status to Completed. But this does not trigger the file download.

Help. I am stuck.

Posts: 13
Joined: 05/07/2008

Check this thread. Ryan, Lyle and torgosPizza have been helping here. Sorry if you've read this already.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

According to Lyle, it is possible for an order to be completed regardless of when the payment is received. In other words, the payment could be received first, and THEN the order completed ("Checkout completed"). However in our live site experience, this is not the case. That's why I created a different Workflow-ng configuration to not act based on when Checkout is completed, but rather, when a Payment is entered for an order.

paulg, you can use devonl's step-by-step tutorial, but here is my Workflow configuration that fixed our Paypal issues.

Invoked on event: A payment gets entered for an order
Condition: check the order balance (less than or equal to 0.00)
Action: Update the status to completed

I'm not sure if this is related to the order of events taking place, but it was the only solution I found that worked for orders coming in from PayPal. As I've explained ad nauseum, PayPal orders don't always come in at the same time a user completes checkout. This might mean that a user "Completed checkout" in the sense that, they purchased items, their account was created, etc. - but PayPal might be experiencing delays, which it oftentimes does, and so the order will remain in Pending until the payment is received - and the balance becomes 0. Sometimes this doesn't happen for minutes, hours - even days.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com