#ABU_G

1 messages ยท Page 1 of 1 (latest)

left stumpBOT
little scarab
#

Hi there ๐Ÿ‘‹ are you seeing any errors in your logs?

subtle timber
#

No errors in the logs, but I cant see the post request when I see in the dashboard.

#

Actually in the console.log I can see the following:
Error: Checkout URL is malformed

little scarab
#

How are you passing the URL to your mobile device, is it getting altered in that process?

subtle timber
#

its a php application. I am using the following:
$checkout_session = \Stripe\Checkout\Session::create ..

Then when the session is created I am redircting to $checkout_session->url

little scarab
#

Gotcha, so just to make sure I'm understanding clearly, this is a PHP site that you built that you're now trying to access from a mobile device?

subtle timber
#

well its a php laravel site I am building. I have an html form for booking which sends a request to the php api. The api then creates a Stripe session and redirect to the session->url

#

There are also some diverse warnings, not sure whether they are relavant

little scarab
#

Are you using Laravel Cashier as well, or just the Laravel framework?

subtle timber
#

Just laravel framework. I am integrating stripe using.
"stripe/stripe-php": "^10.3"

#

This is the code snippet I am using.

little scarab
#

Is this behavior consistent across multiple mobile devices with varying operating systems/browsers?

subtle timber
#

I only tried it on iOS safari and chrome. Same behaviour.

#

hmmm, its the same behaviour on safari on mac.

#

it also fails

little scarab
#

Is that Mac different from the desktop you originally tested this from where it worked?

subtle timber
#

hmmm, let me deep dive into the code and I might figure it out. I will test a bit more and get back to you. Thanks! ๐Ÿ™‚

#

I fixed it! it seems that having both location header and return redirect created a weird link on safari (the same link appended to itself). Removing location header fixed the problem.

little scarab
#

Glad to hear you got to the bottom of it!