Custom protect plugin for multiple subscriptions to one product

Discussion in 'Customization & add-ons' started by columbia, Nov 29, 2010.

  1. columbia

    columbia New Member

    Joined:
    Sep 9, 2010
    Messages:
    4
    I'm porting an existing product over to amember from another system. In the old system a single username can have multiple active subscriptions of this single product. When the user logs in, if they have multiple subscriptions, they are redirected to a page that lists them and allows them to choose which one they are logging into.

    It looks to me like amember allows a member to have multiple subscriptions to a single product and the unique identifier for each subscription is receipt_id. Is this correct?

    If so, when creating the account using {protect_plugin}_added how can I access the payment info to get the receipt_id? Looking at the eFront plugin as an example it looks like the payment_id used to be a parameter to {protect_plugin}_added but looking at the code and docs now that doesn't seem to be the case anymore.

    Any ideas are appreciated.

    Michelle
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
  3. columbia

    columbia New Member

    Joined:
    Sep 9, 2010
    Messages:
    4
    Hi Alexander,

    Thanks. Is the finish_waiting_payment hook called every time a subscription is activated?

    In our user database we have 2 tables that manage the subscriptions, the first one holds the username and password, the second one breaks down each subscription and contains the primary key of the first one. I can take the primary key of the subscription table and use it in amember if needed.

    Is there a way to tie a list of payments to a single subscription in amember? If there are 2 subscriptions that are billed monthly, how do I tell which payment ties to which subscription?

    Another way around this that I'd prefer not to use is to create a new product for each subsequent subscription and require the previous product to have the subsequent one active.

    Thanks,
    Michelle
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes.

    This depends on payment system that you will use.
    Also what will be the difference between each subscription?
  5. columbia

    columbia New Member

    Joined:
    Sep 9, 2010
    Messages:
    4
    On the amember side, there won't be anything different between the subscriptions. The basic explanation of it is customer buys website hosting for $10 for the first site and then they pay an additional $5 for each site over and above the first one.

    We are planning on using website payments pro for the payment system.

    Thanks,
    Michelle
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    For Paypal's WPP you can check for $payment[data][PAYPAL_PROFILE_ID] it will be the same for all payments within single subscription.

Share This Page