PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

How to implement a subscribe with payment ?

Solved
ngatsejacques

Oct 30th, 2022 10:23 AM

Hi, For some type of visitor i want to implement a subscribe before register, i tried to implement my offers tabs, but the problem is that people do subscribe but don't have a form to register, how to implement a sequence where people subscribe then create their accounts ?

i tried to play with the : setting('billing.card_upfront')){{ route('wave.register-subscribe')}}

but i got an error saying that the route register-subscribe doesn't exist

What should i do ?

bobbyiliev

Oct 31st, 2022 01:52 AM

Hi there,

When you enable the Require Credit Card Up Front in your Voyager admin, this will ask the users to subscribe before they get an account:

After a successful payment, a new account will be created automatically with the email that they've specified during the Paddle checkout process and they would get to the following form where they can add details for their new account:

Let me know if this works for you

Best,

Bobby

Report
1
ngatsejacques

Oct 31st, 2022 02:14 AM

Hi Bobby,

Thanks for the answer. But my problem is that i want to force card upfront only for people coming from some countries outside mine.

So overall this option is disabled, but i want to enable it only for some countries (i managed to get the ip and the country)

But the route "route('wave.register-subscribe')" is nowhere to be found.

Humm maybe it's this part that is missing :

"After a successful payment, a new account will be created automatically with the email that they've specified during the Paddle checkout process and they would get to the following form where they can add details for their new account:"

bobbyiliev

Oct 31st, 2022 02:38 AM

Best Answer

Hey,

I think that you could achieve this by extending the logic in the wave/src/Http/Controllers/Auth/RegisterController.php file and mainly the showRegistrationForm() method:

    public function showRegistrationForm()
    {
        if(setting('billing.card_upfront')){
            return redirect()->route('wave.pricing');
        }
        return view('theme::auth.register');
    }

In there you could add an additional check to see if the user IP is outside your country and redirect them to the pricing page rather than the registration page.

Let me know how it goes!

ngatsejacques

Oct 31st, 2022 02:48 AM

Ha yes that is nice, because i handled it in the same page with an if else and that made errors, people that paid, didn't got their account created. It happened 1-2 times but this error is heavy to handle plus people send requests to paddle it's a hassle.

I'll try your advice and handle it in controller before showing the forms

Thanks

bobbyiliev

Oct 31st, 2022 02:53 AM

Sounds like a plan! Let me know how it goes!

hruskawilliam

Nov 3rd, 2022 04:42 AM

Seems cool.