Chapter 3. Setting Up Your Program
This chapter will explain, in detail, how to correctly setup the Billing Manager, and start accepting membership payments. Please read through
this chapter very thoroughly, as it explains exactly what needs to be done in order to fully setup the Billing Manager module. Please note, before starting this chapter,
you must first install the Billing Manager through the Modules section of the Envex Developments Customer Area.
3.1 Load Your Crontab File
Once the Billing Manager has been installed, the first thing you must do is reload your Crontab file. To do this, login
to your web server via Telnet / SSH, and change directories to the /wsr_data/ directory on your server. Once there,
type crontab cron.wsr at the telnet prompt. This will reload your Crontab file.
If you are unsure of how to do this, please submit a support request through the Customer Area, asking Envex Developments to load
your Crontab file for you.
3.2 Move the enroll.cgi and paypal.cgi Scripts
This step is completley optional, and is only required if you would like the enrollment form on your SSL server. This way, all new members will
join your program on a SSL server, instead of a normal web server. Please note, you must already have SSL setup on your server. If you do not, please
contact your web host and ask for instructions on how to use SSL. If you currently own a dedicated web server, Envex Developments can install
SSL on your web server for you. For a quote, please submit a support request through the Customer Area.
Basically, all you need to do is move the enroll.cgi and paypal.cgi scripts, which are currently on your server, over to your SSL directory. To
do this, please complete the following steps:
- Login to your web server via FTP
- Change to the /cgi-bin/wsr/modules/bill/bin directory of your web server
- Download the enroll.cgi and paypal.cgi scripts to your computer. Make sure you download them in ASCII mode! Please do not move the update.pl or backup.pl files. They must remain exactly where they are.
- Change directories on your web server to the directory which contains your SSL server
- Re-upload the enroll.cgi and paypal.cgi scripts to your SSL server, and CHMOD both scripts to 0755
3.3 First Time Setup
The next thing you must do is run First Time Setup. To do this, login to your Admin Control Panel. Once
there, click on the Billing Manager link under the Installed Modules box, in the bottom left hand corner of the screen. When the new Billing Manager menu comes up, click
on the Setup menu, and once that expands, click on the First Time Setup sub-menu.
You will then be taken through First Time Setup, which is only one or two pages long, depending on how your program is setup. If you have any questions regarding any questions asked on
First Time Setup, please click on the green Help button beside the needed section to view a more detailed description of that section.
3.4 Create Your Products
The next step is to create all needed membership products. You need to create one product for every different type of member who can
join your program. For example, if you have Free and Gold members, you would create two different products.
Go to the Products->Create New Product menu of the Admin Control Panel for the Billing Manager. The first section on the page is
titled Product Information and should look like:

The first field asks for the name of the product. This can be anything you would like, and can contain spaces and special characters. The next field asks
for the price of the product. This is how much the member will first be charged when joining, and how much the member will be charged every interval payment (eg. monthly payment). If this
is a free member, who does not require any payment to join, simply enter 0 in this field.
The next question asks for the Charge Type of the product. If this is a one-time charge, and there is no recurring charges (ie. monthly payments), or if this is a free membership, select one-time charge charge. However,
if this is a recurring charge (ie. monthly payments), then select recurring charge from the list.
The next two questions are only applicable if you have selected Recurring Charge for the Charge Type. This section asks two questions, the first asking for the Charge Interval. This means, how often
would you like to charge your members? Simply enter an amount in the field provided, and select the needed interval from the list. The next question asks for a setup price. For example, if your
offering membership for $19.95 a month, plus a $25 setup fee, then you would enter $25 in this field. Every new member would then be charged $44.95 when they first join, and $19.95 every month after.
The next section of creating a product is titled Membership Information and looks something like:

Depending on how your program is setup, different select boxes will appear in this section. This section is asking which type of member will be created
when someone purchases this product. As stated in Chapter 2, when a new member joins your program, they are actually purchasing a product.
Using the select boxes, specify the exact member which will be created when someone purchases this product. Using the above image as an example, when
a new member purchases this product, they will become an Active Gold member, and the needed commission will be added to their upline.
If your accepting PayPal payments, the next section will appear:

The first field asks for a PayPal e-mail address. In this field, enter the PayPal e-mail address which you would like all funds sent to. In other words, enter the e-mail address
you use to login to PayPal. The next field asks for a image URL. If wanted, you may enter the full URL to an image, which will be displayed on the PayPal payment page. You may also
leave this field blank. The last field simply asks if you would like to allow members to specify an additional note with payment, or not.
Go through the above steps, and create one product for each type of member who can join your program. Please note, if you offer a Free membership, which does not require any payment, you will need to create
a product for this (eg. Free Membership Fee). Once you have created all needed products, proceed to the following section.
3.5 Generate Enrollment Forms
The next thing you need to do is generate all needed enrollment forms for your program. The enrollment forms are which new members will use when joining your program. In general, you will only need
to create two enrollment forms, one for free members, and one for paid members. However, if wanted, you may create and use additional enrollment forms.
First, go to the Setup->Generate HTML Forms menu of the Billing Manager module. This page only asks you one question, whether or not payment is required. If you are creating an enrollment
form for free members, then select No. However, if payment is required, then select Yes. Once you click on the submit button, a new page will appear, showing the results
of the enrollment form.
The bottom of the page allows you to save the results to your web server. Simply enter a name of a web page, and click on the Save HTML Template To Server submit button. For example, if you have two member types,
Free and Gold, you would create two different enrollment forms. The first would require no payment, and you would save it as free.html. The second would require payment, and would be saved as
gold.html.
All enrollment forms are saved in the /cgi-bin/wsr/modules/bill/htmlt/forms directory of your web server. You may customize these forms anyway you would like.
3.6 Add Links To Your Web Site
The next step is to add the needed links into your self replicating web site, to connect to the enrollment form and Billing Manager. First, go to the Products->Generate HTML Code menu
of the Billing Manager. This will bring up a screen which looks something like:

Select the product which new members will purchase, and the enrollment form which they will fill out, then click on the Generate HTML Code submit button.
This will generate the needed HTML code which you must place in your self replicating web site.
Using the above image as an example, the HTML code which will be generated will allow a new member to purchase the Free Membership Fee product, using the free.html
enrollment form. Once you submit the form, you will see a page which looks something like:

You only need to use the HTML code from one of the boxes. Simply copy and paste the HTML code displayed, into your self replicating web site. When a new member clicks on this link,
the specified enrollment form will be displayed, and they will purchase the specified product. Continue to create HTML code for every type of member needed.
3.7 Define Upgrade Prices
This step is only required if you would like to allow your members to upgrade their membership through the Member's Only Area. First, go to the
Products->Upgrade Prices menu of the Billing Manager. This page contains two sections, the second of which is titled Create New Price, and looks
like:

The first two fields in this section ask for which product the member will be upgrading from, and which product they will be upgrading to. The third field asks for a price which the member
will be charged when upgrading. Please note, the member will not be charged any other fee when upgrading, except for the amount you enter here. The last question asks whether or not you would
like commission added. If you select Yes, when a member upgrades, the script will add the needed Sign Up commission values to the member's upline.
Using the above image as an example, a Free member may upgrade to a Gold member for $9.95. The member will only be charged $9.95 when upgrading, and will not be charged
again until the first recurring payment, which is one month from the day the member upgrades. Continue to define all needed upgrade prices using the same method.
Once you have defined all needed upgrade prices, you must place the needed links in your Member's Only Area. Go back to the Products->Upgrade Prices menu of the Billing Manager. The
first section, titled Current Upgrade Prices should look something like:

Select the needed entry from the table and click on the Generate HTML Code submit button. The next page will display the needed HTML link
which you can put in your Member's Only Area. Simply copy and paste the HTML link into the web pages of your Member's Only Area. Members will then be
able to upgrade their membership by logging into the Member's Only Area, and clicking on the HTML link.
3.8 Add Member's Only Area Links
The next step is to add the needed link into your Member's Only Area, which allows your members to view detailed information
on all transactions on their account. All you need to do is copy and paste following HTML link into your Member's Only Area:
<a href="members_only.cgi?authtext=~authtext~&module=bill&action=view_transaction">View Transaction Information</a>
3.9 Edit E-Mail Messages
The last step in setting up the Billing Manager is to edit the e-mail messages as needed. Go to the Communicate->Edit Message
menu of the Billing Manager, and a list of e-mail messages which the Billing Manager uses will appear. Please note, these e-mail messages are only
meant for electronic receipts, and nothing else. You should not use these e-mail messages for things such as welcome messages, or informational reports. With installation, all
e-mail messages already have default information in them.
The list of e-mail messages is split into three different sections. The first section titled Transaction Messages are all e-mail messages
sent out when a new transaction is placed in the database, and / or processed from the Admin Control Panel. For example, the message titled "Approved Transaction - Admin Notification" is sent
to the administrator (you) when a transaction is approved. The two Pending messages in the list are for when a member places a new order, which is awaiting your approval
through the Admin Control Panel. The two Pending messages are only needed if you first authorize the credit card, and manually approve the payment through the Admin Control Panel.
The second section titled Subscription Messages contains all e-mail messages which are sent when a subscription is either created or cancelled. For example, if a new member joins your
program, and purchases a product with a recurring fee (ie. monthly fee), then the "Subscription Created" e-mail messages will be sent. The third and last section is titled Other Messages, and
only contains one e-mail message which is the Payment Reminder message.
3.10 Setup Complete!
If you have successfully completed all above steps, the Billing Manager has been successfully setup on your server, and is now ready for use. New members should
now be able to join your program through the Billing Manager, and all recurring payments will be successfully charged.