General Community > Scripting Help

Disallow registration if subscription fails?

(1/1)

Decent_946:
Hey there,

I want my site to have only subscribed users. For that, I've managed to create additional features. Upon registration, a member is redirected to the subscription page. It has some plans listed. The user is required to select a plan and proceed with payment. If the payment is successful, he is redirected to the 'success' page. Else if the payment fails, he is redirected to 'failure' page.

Can be tested here: http://tvpsite.ml/ (its just a testing site)

Note: It's a testing site. So not integrated with PayPal. Instead, clicking plan1 and plan2 will redirect you to 'success' and 'failure' page respectively.

The problem I'm facing here is, I'm not a PHP pro. The user account gets created as soon as the 'register' button is clicked. I want the user account to get created after he has reached the 'success' page and cancel the registration process if registration (subscription) is abandoned or redirected to 'failure' page.

In this case, I need to hold the registration data in the DB until the user is redirected to the 'success' page. So, I need someone to explain how can I do that, if possible.

Best Regards!

Kindred:
that really can't happen....    because in order to process the registration/payment/return, there has to be an account ready to receive it.

What you are talking about basically is replacing the entire registration and group subscription system of SMF...

Sir Osis of Liver:
That's the second request I've seen in couple of days to make registration contingent on successful subscription.  There's an alternative I did for a forum a while ago.  You can allow users to register normally, then redirect their login to Profile -> Paid Subscriptions if they're not in subscription membergroup.  They can view forum but only see what's available to guests or non-subscribers, i.e., a news item or topic that explains forum content is available only to subscribers.

Decent_946:

--- Quote from: Sir Osis of Liver on April 03, 2020, 01:10:43 PM ---That's the second request I've seen in couple of days to make registration contingent on successful subscription.  There's an alternative I did for a forum a while ago.  You can allow users to register normally, then redirect their login to Profile -> Paid Subscriptions if they're not in subscription membergroup.  They can view forum but only see what's available to guests or non-subscribers, i.e., a news item or topic that explains forum content is available only to subscribers.

--- End quote ---
That's the only option left I guess. I'll continue with that. And, come back if I need some more support in any other thing.

Thank you. :)

Marked as solved.

Navigation

[0] Message Index

Go to full version