Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4248620
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:16:58+00:00 2026-05-21T04:16:58+00:00

I’m building a paid membership site in php using the Zend Framework. I need

  • 0

I’m building a paid membership site in php using the Zend Framework. I need to work out a workflow for charging users. We have a number of monthly packages each offering varying degrees of services. For an example:

A free plan which allows users to create one workspace and one user

A Basic plan which allows to create 5 workspaces and 3 users and costs 15 dollars/month

A Premium Plan which allows to create 20 workspaces and 10 users and costs 35 dollars/month

A Heavy Duty Plan which allows to create 50 workspaces and 30 users and costs 65 dollars/month

I would mostlikelye be integrating with a third party gateway like AlertPay for now – however the packages are monthly and 🙁 sorry to say I haven’t actually signed up on any monthly membership service site so far and wonder on how do you incrementally charge a user each month.

Do you insist that they enter their credit card details each month or do you actually ask them for the detaisl once and then you charge it monthly – I honestly doubt the latter can even be considered.

Or do users pay in advance for how many months they wish to use – how is it done normally.

Also I would like to give my users a 10 day free trial of all the paid packages upon signing up. How would I implement this in code. I have my application set up and is functioning as though all users were administrators i.e no holds on anything and would now want to build in teh restrictions to monetise but am a bit lost on the work flow and the code implementation and data design to do this.

Reminds me are there any online services or open source applications that I can use to plug in to my application and handle this aspect of the site for me?

UPDATE =========================

Very comprehensive answers, however on a development level – what should I store in my database and how would I design the tables required. I understand not that each month for a monthly subscription a postback would be made to a url I would provide the gateway. Like what would be the bare essentials here for the database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:16:59+00:00Added an answer on May 21, 2026 at 4:16 am

    Well, you’re asking two questions.

    how do you incrementally charge a user
    each month?

    What you are looking for is recurring payment, most payment gateway provides such options (Paypal does). Basically, it stores credit card information in a secure database, and run a cron every day to check for recurring profile and ask for authorization. However, I actually don’t advise you to do it yourself, it’s difficult, and somehow illegal in most country. (You can’t store CC numbers yourself).

    Some website will charge you once for n months, but in a user perspective point of view it can afraid them.

    How would I implement this in code?

    Zend Framework ships a component (Zend_Acl) which will help you to build an Access Control List.

    What you can do is created one “role” per subscription type, each with different privileges on different resources.

    If you know the MoSCOW method, it is somehow similar:

    • (Role)Free plan can (Privilege)register (Resource)website.
    • (Role)Basic plan can (Privilege)create 5 (Resource)workspace.
      etc.

    Note, that most of the time, there is a kind of Privilege Escalation, because on how you can inherit roles.

    You need to isolate, and find what your resource, resources can be anything you want, and even be dynamic and created on the fly.

    Using assertions, you should be able to limit the number of workspace per role.

    Class WorkspaceCountAssertion {
    
        const MAX_WORKSPACE = 5;
    
        public function assert(Zend_Acl $acl,
                               Zend_Acl_Role_Interface $role = null,
                               Zend_Acl_Resource_Interface $resource = null,
                               $privilege = null)
        {
            //retrieve the current workspace count
            if ($workspaceCount > self::MAX_WORKSPACE) {
                return false;
            }
    
            return true;
        }
    }
    
    $acl->allow('basic', 'workspace', 'create', new WorkspaceCountAssertion());
    

    It gives you the idea.

    Note, that I never used the term user, controller, etc., you actually need to think in terms of Role, Resource, Privilege.


    You need to store the role, with its associated account in a simple many-to-one relationship.
    Each account can have one role. How to update this when the payment stop? Depends, but in most case you’ll need to run a cron which will check for ending subscription and check for recurring payment, depending on the payment gateway, it’ll either postback the resulting transaction, or return it directly with the webservice. If the payment failed or is refused, then you can change back the role to a free account.

    There are several way to do that, it depends on your application and requirements.

    You may want to store each monthly subscription, or update a linked account/subscription row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.