supergate


Supergate Recurring Billing System for Password Sites - Documentation News CGI Scripts Become A Member Contact Us Support Download Area   Documentation SUPERGATE:  V9.5  Copyright 2001 Psybercore, Inc. - All Rights Reserved. Selling redistributing or modifying any or all of the code for this program without prior written consent is expressly forbidden. You must obtain written permission before redistributing this software over the Internet or in any other medium. In all cases copyright and header information must remain intact. UPGRADING FROM 9.1 To upgrade from 8.5 simply replace mastergate.cgi and batch.cgi files with the new ones.  WARNING - DO NOT UPGRADE UNLESS YOU HAVE A NEWER AUTHORIZE.NET ACCOUNT.  If you already have supergate functioning you DO NOT NEED THIS UPGRADE. WARNING - THIS EXTREMELY ADVANCED CGI CODE Our support policy confines us to answering SPECIFIC questions about the installation.  We do not teach perl, systems configurations or unix as part of the membership.   If you require this level of support you will have to pay for installation.   Feel free to give it a shot - if you have the time and like to learn you are on the right page.  For more information regarding support policies read the FAQ.  If you prefer to have the system installed for you simply contact PSYBERCORE to have this arranged. Preleminary Material for review Mysql Tutorial Interfacing to Authorize.net Perl and Telnet Tutorials System Requirements Supports Authorize.net Version 3.0 SSLEAY/Open SSL required Customizable to work with all operating systems Customizable to work with all web servers If you are using NT you must have DAF installed Perl 5 Sendmail Merchant Account with Online Validation and ability to communicate through cgi interface REQUIRED for realtime validation Preliminaries Determine the path to PERL 5 on your web server host.  Note that some web hosting companies run both PERL 4 and PERL 5.  Make ABSOLUTELY sure you are not setting this up under PERL 4.  Ask your administrator if you are not sure. If you need to review or learn the basics of CGI and Perl visit the tutorial Download the tarfile for this program and save it to your desktop.  Unpack the tar archive on your desktop using a program that unpacks UNIX TAR ARCHIVES. If you don't have such a program then download WINZIP FREE from SHAREWARE.COM.  After you have unpacked the TAR archive you will have a collection of folders and files on your desktop.  Now you have to do some basic editing of each of these files (or at least some of them).  Use a text editor such as wordpad, notepad, BBEdit, simpletext, or teachtext to edit the files.  These are NOT WORD PROCESSOR DOCUMENTS they are just simple TEXT files so don't save them as word processor documents or save them with extentions such as .txt or they will NOT WORK.   Note that there may be a some files inside of folders which are "blank".   This is normal. Preparing the CGI scripts Define Path To PERL 5 The first step is to open up each and every file that has a .cgi extention and edit line number one of each script.  Each of the cgi scripts is written in perl 5. For your scripts to run they must know where perl 5 is installed on your web server. The path to perl 5 is defined to a cgi script in the first line of the file. In each of the cgi scripts the first line of code looks something like this: #!/usr/bin/perl If the path to perl 5 on your web server is different from /usr/bin/perl you must edit the first line of each cgi script to reflect the correct path. If the path to perl 5 is the same no changes are necessary. If you do not know the path to perl 5 ask the webmaster or system administrator at your server site.   Configure the .cgi files configure.cgi (for accountcreate.cgi and admin tools) Below are the variables used for mastergate in ALL of the other cgi scripts.  All of the other cgi programs USE configure.cgi to figure out where certain things are.  The configure.cgi script located inside the cgibin when you unpack is to be placed inside the same directory as accountcreate.cgi and the rest of the admin tools.  $date_command = "/bin/date"; $mysqldatabase = "database name";  Name of your mysql database. If you are using a seperate mysql server Set $mysqldatabase to databasenameServername $mysqlusername="mysql username"; $mysqlpassword="mysql password"; $mailprog = '/path/to/sendmail'; $adminemail = "you\@yourdomain.com"; $accountcreatecgi = "http://www.yourdomain.com/cgi-bin/mastergate/accountcreate.cgi"; $deletecgi = "http://www.yourdomain.com/cgi-bin/mastergate/delete.cgi"; $modifycgi = "http://www.yourdomain.com/cgi-bin/mastergate/modify.cgi"; $membersurl = "http://www.yourdomain.com/members/"; $passwordfile = "/path/to/passwordfile"; $referer = "yourdomain.com"; $LOGIN="authorize.net username"; $PASSWORD="authorize.net password"; $maxrebillattempts = number of times to retry card (if card fails) $rebilldelay = number of days between rebill attempts (if card fails) For more information interfacing to authorize.net See the authorize.net documentation for any confusion regarding the structure/syntax of the form fields and their required values. Uploading the files /cgi-bin/mastergate/ accountcreate.cgi cgi-lib.pl forgot.cgi modify.cgi passwords configure.cgi mastergate.cgi /cgi-bin/mastergate/admin/ (password protected) add.cgi delete.cgi download.cgi expire.cgi impneg.cgi modify.cgi search.cgi upload.cgi configure.cgi (duplicate copy of same configure file used above) batch.cgi Note that we no longer support using port 80 (non-encrypted/non-SSLEAY) for security reasons.  It is also advised that you seperate the admin cgi scripts into a seperate password controlled directory so they can only be executed by the admin. The rest of the files Now create 3 more directories and upload files as follows http://www.yourdomain.com/mastergate/ forgot.html (so members can retrieve forgotten passwords) signup.html (the signup page - points to mastergate.cgi) http://www.yourdomain.com/mastergate/admin index.html for admin panel Cross server integration Note that you cannot run this system cross server.  Thus your secure order form must be on the same server that your website is on.  This is because the billing system and password system rely on a common mysql database. Set Your Script Permissions File access permissions must be set correctly for this program to run. The table below lists the permissions of each file which are to be set by the unix command (chmod) used to set the correct access permissions. You must set the access permissions for each of these files.  If you are using WS_FTP then right click on the files located on your webserver.  Then you will see a hidden menu pop up.  Click on CHMOD(UNIX).  Then a box pops up with 9 checkboxes.  Set permissions for all .cgi files to 755 and all others to 777. Editing the order form http://www.yourdomain.com/mastergate/signup.html The form action of this page must point to mastergate.cgi.  This must reside on a secure server that supports SSLEAY.   Inside the order form you will see near the bottom a selection box for various memberships.   Number each selection.  The values for each selection are defined inside of the configure.cgi file.  In the example below we set 2 membership options.  #1 is set for 30 days for $19.95, #2 is just $19.95 per month, #3 has a $1.95 7 day trial period then is $19.95 per month. <select name="membership"> <option value="1">30 days - $19.95 <option value="2">$19.95 per month <option value="3">$1.95 for 7 days then $19.95 per month </select> CONFIGURING CONFIGURE.CGI FOR OPTION #3 Set each membership option to a unique number.   Then go inside of the configure.cgi script and edit the following to reflect the $ per membership and the number of days ($expire) each membership is worth.  There are 7 variables associated with each membership type.  Note you can setup multiple order forms but for simplicity we only will deal with a credit card order form.   $INITIALBILL 1.95 Client is billed $1.95 immediately $AMOUNT $19.95 Client will be billed $19.95 per recurring period $EXPIRE 99999 This account will never expire $CYCLE 0 Number of days since last billing $INTERVAL 30 Number of days until next billing $DELAY 7 Delay period before recurring billing starts $DESCRIPTION 7 Day Acct Describe This Item You are Selling Thus is our example here a client that signs up is billed $1.95... 30 days later they will be billed $19.95... this will continue until they have been in the system for 99999 days (forever basically).  The basic idea is that $INITIALBILL is the billing amount from the instant of signup.  $CYCLE begins at 0 and increments by 1 every day.  Thus 8 days later $CYCLE will be 8.   Eventually $CYCLE will be > $DELAY and then $DELAY will be set to 0 and $CYCLE will restart at 0.  $CYCLE continues to increment until it is greater than $INTERVAL and then the client is rebilled CONFIGURING CONFIGURE.CGI FOR OPTION #1 Set each membership option to a unique number.   Then go inside of the configure.cgi script and edit the following to reflect the $ per membership and the number of days ($expire) each membership is worth.   There are 7 variables associated with each membership type.  Note you can setup multiple order forms but for simplicity we only will deal with a credit card order form. $INITIALBILL 0 Client is billed $1.95 immediately $AMOUNT $19.95 Client will be billed $19.95 per recurring period $EXPIRE 31 This account will never expire $CYCLE 0 Number of days since last billing $INTERVAL 9999 Number of days until next billing $DELAY 0 Delay period before recurring billing starts $DESCRIPTION 30 Day Acct Describe This Item You are Selling Thus is our example here a client that signs up is billed nothing... 30 days later they will be billed $19.95... the next day they will be kicked out of the system. More on running the system The admin interface allows you to browse, edit, getinfo, modify, and delete any member on your system.  You can also import/export external billing databases and negative databases.  Everytime a card bounces the $REBILLATTEMPS variable is incremented until it exceeds the value of $maxrebillattempts whereupon the account is then transported to the "expired" database and the account is terminated.  The cardholder information is also copied to the internal "negative database".  An email notice is also sent to the accountholder and the administrator. You can search by email, username, or credit card number to retrieve any record.  By default username=email and the system only allows one account per unique username.  If you require multiple accounts per email address you will need to customize the system.  After pulling up a record you can then give people extra time, change any or their information or delete them from the entire system.  Note that if you have multiple accounts per credit card number or email address the search results will only pull up the first result.  In this case you need to search by username. Crontab files You will need to setup TWO crontab files.   One executes expire.cgi and the other executes batch.cgi.  expire.cgi does date calculations and manages the password file, batch.cgi then sifts through the database and if they are due to be billed they are billed.  If there is a problem with their credit card their account retried until $maxrebillattempts is exceeded then the account is deleted. Generally, whever you are crontabing a cgi file you cannot use relative paths.  Thus, you will need to change the require "configure.cgi" file to the full path to configure.cgi file (inside of batch.cgi and expire.cgi).  This may also require some system tweaking to get it to work depending on your isp. The crontab files should execute daily around midnight is recommended.  

Wyszukiwarka

Podobne podstrony:
SUPERGROMADA W CENTAURZE
NOWE Ubezpieczenie grupowe SUPERGRUPA
SUPERGROMADA W HYDRZE
SUPERGROMADY W HERKULESIE
SUPERGROMADA W LWIE
LISTA NAJBLIŻSZYCH SUPERGROMAD
NAJBLIŻSZE SUPERGROMADY
SUPERGROMADA SHAPLEY
SUPERGROMADY W WOLARZU
Boseck Lie Superalgebras & Lie Supergroups I [sharethefiles com]
SUPERGROMADA W PAWIU INDIANINIE
SUPERGROMADA W ZEGARZE

więcej podobnych podstron