This topic is locked

Page Viewable Only After Payment - PayPal

1/30/2008 1:55:37 AM
ASPRunnerPro General questions
U
umkemesic author

Hi ! I am using ASPRunner Pro Build 327 and have a few questions regarding PayPal.
I am designing a databse which has a "register page" that enables users to create userID's and Login's.
Everthing is working swell, and I am ready to go...
However, I want to be able to use PayPal's subscription service so that people can only access the registration page after they paid for their supscription. I don't want people able to bypass the Paypal and just create UserID's willy-nilly.
Pay for a subscription, then register.
I have been searching forums all night, and I found something close, but its all gibberish to me (I don't know anything about programming). But I am not a total layman, I understand cut and paste, etc.
Here is what I found so far:

rocknbil

:3479637 10:02 am on Oct. 17, 2007 (utc 0)



One "right" way to do this . . . . or at least how I've done it . . . requires a little server side programming. It would make a great programming starter project in any language, but it's a little more technical than creating a web page.
Here is the crux of your problem: you need to protect the download files, not the page it's on. Let them bookmark it. Invite them to, no worries.
The short story: If you want to automate the process, you need to send a unique id to the payment processor, then on a successful response store the id somewhere (database, text file, whatever.) Then redirect or print a page to the browser that reads in where you've stored the unique code, and if a matching ID is found, it opens the download file from a hidden location and prints it to the browser, forcing the download. The URL of this response should use ONLY the unique ID:

yourdomain.com/payment_complete.cgi?tx_id=1234567890

or if you can use mod_rewrite,

yourdomain.com/1234567890
After 24 hours or a period of your choosing, you manually or with a cron job remove the codes from the text or regular database. Poof. The script that does the downloading can't find the ID, it can't produce the download.
The beauty of this approach is no one ever knows the "secret location" of the downloaded files, and you can control the access period.
For a non-automated solution, you can alter the logic to suit how you work. If you manually receive payments, you can just upload a list of codes, then email each of the customers the url in the format yourdomain.com/payment_complete.cgi?item_id=anything-you-want.
This boils it down to a small script that accepts tx_id, looks for a matching value in the "database," if found, produces the download, if not, produces a page, "invalid id."


Again, I don't understand this, is there an easier way?
I tried the PayPal way.  I have VStudio 2003, and tried using the PayPal Buttons, but VS doesn't open aspx pages compiled with ASPRunner in design view (only code view) and doesn't allow to drop the buttons anyways, only allows for newly created ASP pages from scratch.
Again, I am a novice, I am open to any Ideas <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7402&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 1/30/2008

Well, the scenario is quite simple however some coding is required.

Contact me directly at support@xlinesoft.com with your order number if you need more help.
Here is how it works.

  1. You allow customers to register and send them an email with Paypal payment link in AfterSuccessfulLogin event
  2. By default all customers marked as "non-active". You need to implement BeforeLogin event to make sure "non-active" members are not able to login.
  3. When payment is received admin marks member as "active". This can be done manually or automatically via Paypal IPN notifications.
    So you need a couple of extra fields in the login table, two events and Paypal IPN script that marks user as active.

U
umkemesic author 1/30/2008

Thanks! I knew there had to be simple explanation...It seems like a common situation.