#ankit-react
1 messages · Page 1 of 1 (latest)
My application is in the react js and node js
while i am creating a react build and test strip its working fine
but if i will create a react build with the node js it not working on the server
But its working on local system
Can you tell me exactly what's not working?
so do i need to add any setting on server level
my concern is that, stripe is not working with the node build on the server, while it is working fine in my local system.
i have used the cardNumberElement, CardExpiryElement, CardCvcElement seperately, i am getting an object response from the CardNumberElement in my local system. but problem is about to the server. i am getting null reposne on the remote server. is there anything wrong on the server?
OR is there am i missing on the server?
Do you have a public URL to access the server?
Yes
OK, can you send me the URL and tell me how to reproduce the problem
cake shop near me cake shop near me cake shop near mecake shop near mecake shop near me cake shop near me
please do login with the below credentials
mphp.magneto@gmail.com
Bh@utik123
click on the cart icon top right and click on the proceed to checkout
continue the steps until PAYMENT step
there is one radio button for the Pay by card(stripe)
OK, I pressed Place order and nothing happened
enter the test card details
41111 1111 1111 1111
12/24
123
please open the console
Yes I have console opened.
i have console with the key "cardElement-2"
click on the place order button and check the console
cardElement-2 null
In server i am getting this : https://prnt.sc/i6J5bxPN0uCC
Can you check if this <CardNumberElement> is wrapped inside an <Elements> ?
yes it is. sir actually it is working fine in my local system. at the end i am getting the card token successfully. you can see the response attached screenshot i am getting in my local system. while i am getting null on the server
Do i need to add any setting on server side ?
Also i have tried with only react build and also its working
Why are you calling stripe.createPaymentMethod in useEffect?
But while i am creating build with node its not working
shouldn't you call it in handleSumbit?
we have a custom place order button and we need to add a custom validation for the card elements so we have handle all the login in useEffect. but why it is working on the local and not on the server. why is that?
I don't really understand they purpose of calling stripe.createPaymentMethod in useEffect() block. There's no way you can create a payment method here because the customer hasn't even enter the card details.
But this method is working on the local system.
My only concern is its not working on the server end.
To my best knowledge there's no way to create a card payment method without card details.
We are passing card details in create payment method
How do you pass? can you share the code?
How do you pass the card number?
we are passing the card number element
You need card number, expiry date and cvc in order to create a card payment method object.
we are passing the card number element -> But the card number element doesn't allow you to pre-populate the card number.
Perhaps you can share with me the PaymentMethod ID that you created from the local system?
ID : stripe_payment
Can we connect over the call ?
So i can explain you in details if possible
Hi! I'm taking over Jack Tan.
Hello Soma.
ID : stripe_payment
the payment method ID should look like this:pm_xxx
Can we connect over the call ?
Sorry but we only do written chat here on Discord
pm_xxx, this is what we are getting from the createPaymentMethod response
Can you copy paste the exact ID you are getting?
Yes, can you copy paste that ID in the screenshot?
pm_1L51jVAflprgPQpUNYpFhCPA
Thanks! It looks like this card was created successfully.
Can you clarify exactly what is your issue?
soma Its working exactly what i need in local system
But while i am moving same on server its not working
So do i need to add any thing for server to work in server as well ?
Got it! I would recommend to ask that question to Stripe support directly, they will have more time to investigate this. Make sure to include all relevance information, like code snippet, PaymentIntent ID, etc.
https://support.stripe.com/?contact=true