GoTTi Posted January 25, 2007 Share Posted January 25, 2007 I cant believe this was here the whole time, and no1 uses it... ok, heres the scenario. if you use or try to use the paypal IPN mod on here: http://www.oscommerce.com/forums/index.php?act...=7&t=179917 and you have digital downloads on your site, then you know that if a user just adds some digital content, then goes to paypal, then goes back to the site, checks their orders page and views the pending order, they can get the download. WELL, everyone has been saying "you need to install the downloads contorller to fix this problem" another 20 minutes and complicated as hell...well the solution was here the whole time and no1 mentions it!!!! after you install the Paypal IPN mod, visit this lonely mod @ http://www.oscommerce.com/forums/index.php?showtopic=247713 and install that. now heres a few things i had to do, because i have 11 order status's, including the paypal IPN, which is my number 11, i had to alter the line in the downloads.php file to add my status line correctly, so when the orders are in the pending order status or whatever i want, the download link wont show. you will have to do the same thing, working with the paypal IPN mod. all you have to do is this: where this instruciton is: To this if ( ($downloads['download_count'] > 0) && ($order->info['orders_status'] != "") && ($order->info['orders_status'] != 1) && ($order->info['orders_status'] != "Pending") && (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) && ( ($downloads['download_maxdays'] == 0) || ($download_timestamp > time())) ) { take that line, and copy: EXAMPLE!!! && ($order->info['orders_status'] != "Pending") and paste it next to that instruciton like: && ($order->info['orders_status'] != "Pending") && ($order->info['orders_status'] != "Pending2") then make note of the order status ID number, which u see on the address bar inside your admin panel when u click on the order status, and add another line like: && ($order->info['orders_status'] != "11") OR whatever your order status is you want to not have downloadable permissions untill YOU update it!!!! THATS IT. i hope i explained this easily...i take no credit for these mods, i just will take credit for bringing them together and helping everyone!!! NOW ALL YOU PAYPAL USERS PUT THE IPN MOD IN, CUZ ITS WORTH IT!!! Link to comment Share on other sites More sharing options...
bkellum Posted January 25, 2007 Share Posted January 25, 2007 Goti, I have been using PayPal for a while now along with digital downloads with no issues. Customer pays for the download, PayPal sends the customer back to the download link on my site and then the customer instantly downloads their purchased product without any intervention from me. I do not use the Download Controller, just stock osC. Hmmm.... Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
GoTTi Posted January 25, 2007 Author Share Posted January 25, 2007 yea but if u use paypal ipn mod, and it records your customers sales as a order on their side, without this mod or the downloads controller (which i couldnt get to work), the customer can just view the order and download the goods without paying. Link to comment Share on other sites More sharing options...
AlexStudio Posted January 25, 2007 Share Posted January 25, 2007 Don't be too excited. This is not your solution. If it worked, I already been using. Official PayPal IPN module put pre-mature orders in database with Preparing[PayPal IPN] order status. In your case, I don't need to pay a dime at paypal, but open another browser to get back to your store and check my order history, the download link must be there, ready to be stolen. Because the order status never be Pending before I actually pay. Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
AlexStudio Posted January 25, 2007 Share Posted January 25, 2007 And more than that, if the payer paid by eCheck, but didn't clear it until a week or so, the download link already expired. Downloads Controller handle these well, it didn't work for you just because you didn't set it up correctly. Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
GoTTi Posted January 25, 2007 Author Share Posted January 25, 2007 oh im not gunna cock fight over you rmod alex, still prolly a good mod, i just couldnt get the thing to work. found a MUCH easier way to go about the entire process anyways, so it doesnt matter. and i know the process of what goes on with the paypal IPN. if you were to do the order process now on my site, and goto the paypal site, then go back to my store, you wont see a downloadable link in your order history. Link to comment Share on other sites More sharing options...
GoTTi Posted January 25, 2007 Author Share Posted January 25, 2007 alex, your wrong. the download link is NOT available using this method, and following the instrucitons i provided with the mod. when the status is set to Preparing[Paypal IPN], that status ID number and name just need to be added to the line that is controlling the digital download, like i explain in the instructions. once that line and status ID is entered, when the paypal IPN places the order in that specific order status mode, that download is NOT available untill updated to the newer status. and in reference to the echeck option, the best thing to use in this situation is this mod, order editor, that i use: http://www.oscommerce.com/forums/index.php?showtopic=54032 so if i a link expires, you can just edit the customers order when you process the echeck payment, or actually ANY order they might put in with a money order or whatever they want, and you can just update the expired link date or just a new digital download to their order. very easy now. Link to comment Share on other sites More sharing options...
AlexStudio Posted January 26, 2007 Share Posted January 26, 2007 alex, your wrong. the download link is NOT available using this method, and following the instrucitons i provided with the mod. when the status is set to Preparing[Paypal IPN], that status ID number and name just need to be added to the line that is controlling the digital download, like i explain in the instructions. once that line and status ID is entered, when the paypal IPN places the order in that specific order status mode, that download is NOT available untill updated to the newer status. and in reference to the echeck option, the best thing to use in this situation is this mod, order editor, that i use: http://www.oscommerce.com/forums/index.php?showtopic=54032 so if i a link expires, you can just edit the customers order when you process the echeck payment, or actually ANY order they might put in with a money order or whatever they want, and you can just update the expired link date or just a new digital download to their order. very easy now. Apparently you have sorted these out in you store with this 'easy' mod. You have the knowledge of PHP sctripting, but many people don't. They might also want to secure pending downloads with other payment modules but don't know where to start with. I am not saying this mod won't work at all, but it needs a lot of work to be improved. I was not talking about the stock eCheck module, it's about official PayPal IPN. People can pay with eCheck via PayPal. No matter what, you still need to update the order manually if the pending eCheck cleared but downloads expired. Downloads Controller handles all these automatically, so I think it is still a better choice. Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
ryanbehrman Posted March 16, 2007 Share Posted March 16, 2007 In http://www.oscommerce.com/forums/index.php?sho...=download+later Cyber2000 gives a code snippet to change in download.php : // Check that order_id, customer_id and filename match $downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''"); This fixes the problem by only allowing the download if status is set to delivered. It works for me but I have not started implementing PayPal IPN yet. My question: Is the code above a suitable alternative to the suggestion in this thread, and which of the two is better to use? I am about to start implementing PayPal IPN. Link to comment Share on other sites More sharing options...
ryanbehrman Posted March 22, 2007 Share Posted March 22, 2007 I've implemented the suggestion in this thread and all works fine. Just to help others, I couldn't find the order status id in the url as mentioned in the original posting here, so another way is to look in the orders_status table and look for the id there. Then if you only want to allow orders for status = delivered, change line 60 of downloads.php (or thereabouts) to ($order->info['orders_status_id'] == [iNSERT ORDER_STATUS_ID FOR DELIVERED STATUS HERE]) Link to comment Share on other sites More sharing options...
www.go3d.us Posted September 27, 2007 Share Posted September 27, 2007 This is a super contribution mod. I've been looking for this. Thank you so much. If you sell downloadable content this is a must to install. I mean it. Install it now! Unlike download controller, this contribution is Very simple to install. This is why you must install this contribution. With out this contribution customer can download your products without actually paying for it. Here is how they do it. As customer go through the check out process, when they get to the confirmation page, they don't have to continue, they simply skip all the next steps (the payment steps). They then type in the URL http://yourdomain.com/yourstorename/checkout_process.php and it take them to the order success page with download link on that page. You can try it on your site and see what I mean. With this contribution installed, if a customer skip the payment page, they will have no download link in the order success page. If they paid by check, they can't download the product until check is clear. Now all I need is a page that say order incomplete instead of order success when customer skip the payment page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.