#Jules Lanquetin - mobile payment form problems
1 messages · Page 1 of 1 (latest)
Can you share a bit more detail? What does your integration look like? What do you mean exactly by mobile not working/appearing?
Can you share an example?
Jules Lanquetin - mobile payment form problems
on the computer version, the payment form is displayed while on the mobile version it is not. it is a php js integration
Is this available somewhere I can inspect?
Do you mean a separate mobile app, or the same webpage when viewing in a mobile browser?
I don't see the payment form (elements) in my chrome browser either
It looks like you have an issue with your initialization endpoint:
Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at checkout.js:23:20
at async initialize (checkout.js:19:28)
which is:
const { clientSecret } = await fetch("stripe/create.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ items }),
}).then((r) => r.json());
The endpoint hits a 500 error for me
Are you sure its working for you on a desktop browser?
Ok, well I don't see any of that when I load the page
Which I attribute to the initialization call failing
you are on google chrome browser ?
Yep:
Why it is working for me and not for you ?
it's weird
I'm not sure -- perhaps you have different JS cached? Have you tried in a new incognito window?
(that's what i used here)
You are right, it doesn't work when I go to the page in private navigation
Due to the same initialize call to create failing?
What do you mean by that?
In test mode the payment form is displayed
Is there a page where we can see that?
You think it's because of the API keys ?
I can't say for certain, but I'd look to make sure your code is doing what you expect in live mode. It appears you are sending requests missing an amount:
https://dashboard.stripe.com/logs/req_Pt3gnTeGj3j4Cs
Is it possible the item ids in your create request are not configured for your live environment so they do not get mapped to an amount for payment?
Oh no, it's because of the cache