Paid Membership With PayPal

Author Message

Børge Warvik

Friday 28 May 2010 2:11:55 pm

I've been given the task of transferring a site over to eZ Publish. The current site has paid membership, and a membership is valid for one year. There are different prices for professionals, students etc. Membership gives access to a section otherwise closed to anonymous users. The site will also have free membership, but then some content made available to paid members will be denied.

As I see it, a simplified worflow:

  1. Make use of module "User"
  2. Create two user groups, one for free and one for paid membership
  3. Extend default user class with: Membership type (free, paid), Payment type (professional, student etc), expiry date (used in case of paid membership)
  4. If new user registers for a paid membership, account must be disabled
  5. Move members into correct user group. Free or Paid group.
  6. Create a workflow to run after content publish. Check if user has registered a paid membership. If so direct the user to PayPal for payment.
  7. If PayPal verifyes payment, enable account. If not, delete account.
  8. Create a cronjob that notifies members that membership will soon expire.
  9. Create a cronjob that checks for expired accounts and disables them.

Have anyone done something like this in eZ Publish? Is this the correct workflow, or do I need to create an extension that does not use module "User" for this?

I will also need to import all the existing users. Can anyone recommend an extension for this?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 00:15:03
Script start
Timing: Jan 30 2025 00:15:03
Module start 'layout'
Timing: Jan 30 2025 00:15:03
Module start 'content'
Timing: Jan 30 2025 00:15:04
Module end 'content'
Timing: Jan 30 2025 00:15:04
Script end

Main resources:

Total runtime1.1202 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 588.1328151.2109
Module start 'layout' 0.00430.0022 739.343836.6484
Module start 'content' 0.00651.1129 775.9922411.7344
Module end 'content' 1.11940.0007 1,187.72667.8516
Script end 1.1201  1,195.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2480160.0002
Check MTime0.00110.1021160.0001
Mysql Total
Database connection0.00070.064010.0007
Mysqli_queries1.083296.6993460.0235
Looping result0.00040.0323440.0000
Template Total1.090997.420.5454
Template load0.00180.158520.0009
Template processing1.089197.225120.5445
Template load and register function0.00010.009310.0001
states
state_id_array0.00100.092910.0010
state_identifier_array0.00190.167120.0009
Override
Cache load0.00150.1331180.0001
Sytem overhead
Fetch class attribute can translate value0.00040.039710.0004
Fetch class attribute name0.00060.057220.0003
XML
Image XML parsing0.00130.113710.0013
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00160.1387160.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ol.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ol.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs