News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Disallow registration if subscription fails?

Started by Decent_946, April 03, 2020, 07:59:53 AM

Previous topic - Next topic

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!
Thankx to RebellioN

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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

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.
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.
Thankx to RebellioN

Advertisement: