Download After Purchase
Hi; I need to enable visitors to d'l s/w after purchasing. Of course, I want the d'l page protected, so I presume I'll have to generate a password, etc. Has anyone done this and have some code they could share to get me started? TIA, BenO
Ben Ocean wrote:
Hi; I need to enable visitors to d'l s/w after purchasing. Of course, I want the d'l page protected, so I presume I'll have to generate a password, etc. Has anyone done this and have some code they could share to get me started? TIA, BenO
You should use a more sophisticated user folder (backed by an sql db for example), and insert the proper user when the payement is completed. You give him the right role (for example : basic buyer / vip buyer...), then you give access to the protected area (the are is protected by allowing only particular roles to see/download the content). Your user can use the login/password you sent him and you inserted in the user db. hth Philipppe
I don't know what you are using for the payment process but here is what you could do if you were using Paypal - Set up a pay pal business account - They allow you to pass them an URL to return to - Generate a key for the user (after the first form on your side) and put that as one of the parameters to pass back in the return URL - The user fills out the first form (on your side) submits, gets a page to say "pay now" where they click through to PayPal. After PP they come back to your site using the return button and your program checks the key and the referrer from paypal and grants them access to the file. I have something like this on http://www.auditt.org/vanity/ although I am not using the key/referrer Cheers, BZ At 6:33 AM -0800 11/11/01, Ben Ocean wrote:
Hi; I need to enable visitors to d'l s/w after purchasing. Of course, I want the d'l page protected, so I presume I'll have to generate a password, etc. Has anyone done this and have some code they could share to get me started? TIA, BenO
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Ben, --On Sunday, November 11, 2001 06:33:50 -0800 Ben Ocean <zope@thewebsons.com> wrote:
Hi; I need to enable visitors to d'l s/w after purchasing. Of course, I want the d'l page protected, so I presume I'll have to generate a password, etc. Has anyone done this and have some code they could share to get me started? TIA,
You should first look how you get the payment thing to work, how you find out when a customer has payd. You can either give her/him an account, which is easy with the API from Userfolder (see Zopebook). For this your payment method must have proxy rules as manager and then make the new account and show/mail the accounts data to the user. You define a role being able to "view" the file(s) and assign all these new users to that role. Thats pretty easy using the API. The new suer might be able to choose her/his own username or you might want to create username/password from random and time. HTH Tino Wildenhain
Hi Ben, I've used our crufty old EMarket product for a situation similar to this.. this is the form that lets them download the documents that belong to a particular "shopping basket". They get 24 hours to download the document. There is a "download form" that sets theItemID and theBasketId before they get to this download "method". -steve <dtml-var standard_html_header> <center> <H3>Final Download</H3> <dtml-if "_.has_key('clientCookie')"> <dtml-let theShopper="shoppers.getItem(clientCookie)"> <dtml-if theShopper> <dtml-let theBasket="basketManager.getItem(theBasketId)" paidStatus="theBasket.paidStatus" paidDate="theBasket.paidDate" lastDate="paidDate + 1" currDate="ZopeTime()"> <dtml-if "paidStatus and (currDate > paidDate) and (currDate < lastDate)"> <pre> <dtml-let theDocument="_.getattr(Documents, theItemID)"> <dtml-call "RESPONSE.setHeader('content-type','application/binary')"> <dtml-call "RESPONSE.setHeader('Content- Disposition','inline;filename=%s' % (theItemID))"> <dtml-return "theDocument(_.None, _)"> </dtml-let> <dtml-else> Sorry... you have 24 hours after purchasing a document to download the data. </dtml-if> </dtml-let> <dtml-else> Error! I can't find that shopper... </dtml-if> </dtml-let> <dtml-else> <dtml-comment> <dtml-call "RESPONSE.redirect('setUserCookie?origURL=' + URL0)"> </dtml-comment> No cookie..... checking for new user info.... </dtml-if> </center> <dtml-var standard_html_footer> On Sunday, November 11, 2001, at 09:33 AM, Ben Ocean wrote:
Hi; I need to enable visitors to d'l s/w after purchasing. Of course, I want the d'l page protected, so I presume I'll have to generate a password, etc. Has anyone done this and have some code they could share to get me started? TIA, BenO
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Ben Ocean -
BZ -
Philippe Jadin -
Steve Spicklemire -
Tino Wildenhain