#Chevy-undefined-paymentmethod
1 messages · Page 1 of 1 (latest)
Chevy-undefined-paymentmethod
llo! I can't do much with pictures of code
Ultimately the problem seems to be that you are trying to retrieve a PaymentMethod and instead of passing a valid id pm_123456 you pass a null variable
How can pass a valid id pm_......?
I don't know, I don't understand the context of your question, where your code is coming from, which doc you're following, etc.
Right now, your code is passing an invalid PM id, you need to find that code, find where the PM id is coming from, why it's null, etc.
I'm trying to retrieve the clientSecret from server(back4app) into my project. I want the user to be able to make payments
Understood! My appologies
@pseudo dagger that code sample means you need to make an API call to your backend to get the clientSecret
Yes, that exactly what I've been trying to do
addNewPaymentMethod
Do you have idea why are you retrieving PaymentMethod inside this backend function?
It looks wrong to me. You should only creating a SetupIntent and returns, that’s it
Ah wait probably you need the exact same PaymentMethod I’d generated from the ApplePay button?
No experience at all with backend function. Do you know how to this work?