There are multiple paths of action depending on if the user has an existing account,
user has no account, user already has access to the desired membership area or the
user's account has been allowed to expire. As a convenience, when the item_no
is missing, an appropriate list of paypal items are displayed depending on the current
users status.
Most of this is done when the user accesses users/pp_signup.php
(This should be with your other files in users/)
Example 5.2. Example URL for the signup form
<A HREF="http://example.com/path/to/users/pp_signup.php?item_no=test200"> Grant access to test200 </A>
You must use some caution in selecting the item numbers, if you provide an item number that had an action of "Add time to account" to someone who is not currently signed up, they might not be given the access levels they expect.
pp_signup.php is the main signup script,
you may use the form variable item_no to determine which
item to use. When this is missing, a list of items are shown to the user.
Different views are shown depending on if the user is
already a member, already signed in or is not signed in. You may change these views
to different PHP files by editing the ~/geniegate/conf/view/users.xml
file. Of interest is the do_handle_paypal_signup method.
When a user is not signed in or has no user account, they can sign themselves up for access using PayPal. After receipt of payment from PayPal, (shown as IPN) their account is confirmed and access to the desired membership group is granted.
This is the path taken, Access to the group is granted after receipt of payment. The diagram assumes the user had logged in previously. This applies to adding time to an account or additional access groups.
![]() |
Important |
|---|---|
Access areas do not expire, membership accounts do. If you provide multiple access areas via paypal, they will be a one-time fee, a user may continue to add time to his or her account indefinitely. Please see the section called “Expired accounts” in the Caveats section for more information about this. |
Abstract
GenieGate includes a return script as well as a default paypal button. Most of this is handled automatically therefore you may skim over this section, it is covered here in the event you need to work with this aspect of GenieGate.
After PayPal is finished, it provides a means of returning to your web site,
these are known as return and
return_cancel in the PayPal documentation.
Cancel is pretty straight forward, it simply means the user has opted to cancel the process.
Return needs to check whether or not access to the desired
group was actually added. (Did they really send money, or are they trying
to "sneak in"? it displays the view
paypal-return.php if all went well,
payment-problem if something went wrong with the payment
or for other reasons the IPN process failed to grant them
access. Finally error-general.php is shown if there
was another problem.
Of course, these views can be changed by editing
~/geniegate/conf/views/users.xml