#meisei81
1 messages · Page 1 of 1 (latest)
You may refer to the guide here: https://stripe.com/docs/payments/build-a-two-step-confirmation
yesterday I tried to create payment method in java and got an error message "Sending credit card numbers directly to the Stripe API is generally unsafe"
your workmate told me that do as the url https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
Yes, his/her suggestion is correct as per error message
but I failed when I do as the steps in that page I
What is the issue you're facing?
I copied the js and html codes in one single html file, and open it in the browser, but there's only a submit button.
I clicked it and no response.
Did you create a Setup Intent and return its client secret to the frontend to render the Payment Element? More specifically, Step 4 to 6?
If the Payment Element is render correctly, you should see something like this
I had imported the stripe jar v22.0.0 into my project but got this error
so I remove the red codes
But I can do this in curl way, so I got the client secret from the curl
Automatic payment method in Setup Intent is only supported from stripe-java v22.14.0: https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md#22140---2023-03-23
I'd recommend upgrading to the latest stripe-java v22.31.0 or at least v22.14.0
Well it says that use v22.0.0 in step one
I see! It's likely an error in the doc. Can you try updating to latest v22.31.0 and check if it works?
I have updated to v22.31.0 and it worked!
Yay! That's great to hear
How could we update the customer's payment method?
Will this be the only way to update the customer's card number in the future?
When Setup Intent is used, the new payment method will be saved onto the Customer object
You can update this new payment method to corresponding integration
Will this be the only way to update the customer's card number in the future?
Yes
To delete old payment method, detach Payment Method API can be used: https://stripe.com/docs/api/payment_methods/detach
You can remove the appearance parameter if you don't intend to use
ok
Hi, after upgrade to v22.31.0, I found that some api errors.
It seems that the parameters "name amount currency" are no more need when creating a line item?