#kerim_paymentelement-error

1 messages ¡ Page 1 of 1 (latest)

tulip zephyrBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1306677731362340875

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

vivid marten
#

checkout.js:90 Uncaught (in promise) IntegrationError: stripe.confirmPayment(): expected either elements or clientSecret, but got neither.

{"error":"Method Not Allowed"}

#

idk

prime needle
#

@vivid marten I would need more details to help you

vivid marten
#

Hello

We use "Custom Payment Flow".

We didn't add any additional lines of code - we only used the suggested Stripes.
We used:

But there is a problem. Nothing is working. We have specified "pk" and "Restricted Key".

prime needle
#

Sorry what does " we only used the suggested Stripes" mean? I don't really understand your sentence

vivid marten
#

{"error":"Method Not Allowed"}

#

I don't understand why this error occurs.

#

Perhaps I can provide you with our code. However, how can I do this safely?

prime needle
#

Sure! The error is quite clear and it says

IntegrationError: stripe.confirmPayment(): expected either elements or clientSecret, but got neither.
so how are you calling confirmPayment()? Log the parameters and you will see it's not set properly

#

kerim_paymentelement-error

vivid marten
#

Tell me, please, what exactly do I need to do to fix the code?

prime needle
#

I can't, I have no idea what the issue is. You haven't given any information other than the error. You are the developer here, you wrote the code, even if it's just copy-pasting the docs. The next step is to debug the code carefully, add logs and figure out what's wrong, exactly what I said above

vivid marten
#

What information do I need to provide you in order for our dialogue to be effective?

prime needle
#

Are you the developer? Do you understand the code? You just shared a screenshot instead of exact real code. Did you add clear logs? What is elements, is it set/defined properly?

vivid marten
#

No, I'm not a developer. Can I send you a "checkout.js" and "create.php "? Will you be able to view the code? Sorry, I just don't understand anything, but I need a working solution.

prime needle
#

I'm sorry but there's no way you can make this work if you aren't a developer yourself. The solution you are implementing is aimed at developer understanding their code.
You need to either hire a professional to do this for you or switch to a no-code solution otherwise such as PaymentLinks https://docs.stripe.com/payment-links

vivid marten
#

We only used the example provided by Stripe on the Custom Payment Flow page. But, for some reason, nothing works, although the server is configured correctly.

prime needle
#

I understand but they are examples. They are not production ready. You can't just copy-paste that demo, go live and accept payments safely.
You confirmed you aren't a developer and don't understand the code. You can not integrate Stripe this way I'm sorry. Please hire a professional to build this for you or use one of our no-code solutions

vivid marten
#

Please tell me what solutions can be found to the error "{"error":"Method Not Allowed"}" ?

prime needle
#

I have. Twice already. You don't understand the code so you can't debug it and fix it. Please hire a professional to build this for you.

vivid marten
#

Okay, I'll hire a specialist. Does this specialist need to understand php or something else? Not everyone had experience working with stripe.