Laravel cashier with react inertia checkout payment link
I'm trying to use Laravel Cashier for Paddle, and I'm facing an issue with rendering a checkout object as a payment link inside a React component using Inertia.
It seems like it only works with Blade components. Has anyone encountered this issue or know how to solve it? Any help would be greatly appreciated!
I had the same issue, not being able to pass the checkout object to Inertia (using Vue) when using the Paddle inline Checkout. Turns out you don't really need it, but you need to create the customer and pass the Paddle customer id to your Paddle javascript checkout (otherwise the customers table won't be populated and thus the webhooks won't work).
So you can simply create the Paddle customer using $customer = $user->createAsCustomer() and pass the $customer->paddle_id to Inertia. This is what I ended up doing, as I handle the Paddle.Checkout settings and items in Vue. But these can also be handled server side using $checkout = $user->checkout('pri_whatever')->returnTo(route('success')); and instead just passing $checkout->options() to Inertia. If you do this you don't have to create the customer separately as checkout does this for you.