Closed sts-ryan-holton closed 7 months ago
Hi there,
Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Duplicated over to: https://github.com/laravel/framework/discussions/49801
Just wondering if anyone from the Cashier team is able to point me in the right direction here? I don't know the codebase or methods, you guys do 🤣
A toArray()
function is available on the Checkout class. It contains a url to stripe checkout.
I haven't used it yet but I'll find out how useful it is soon.
@stuartcusackie That's what I ended up using. My front-end is separated from the backend. Turns out the checkout
method returns a url
key that I can use Arr::get()
to redirect to. Didn't even need the toResponse()
Cashier Stripe Version
15.2.0
Laravel Version
10.41.0
PHP Version
8.2.*
Database Driver & Version
MySQL
Description
I'd like to migrate my subscription checkout process over to the Stripe checkout for better maintainability. My Laravel project serves as an API for a Nuxt JS front-end, this means I need to return the URL of the Stripe checkout to redirect the user to in my axios response in my front-end.
The
checkout
method appears to do something with the redirect method as I see a 303 response code in my browser. I've tried attaching thetoResponse
method to just get the URL with no luck.I just need some guidance in returning a URL from the checkout method please here:
Steps To Reproduce