#chikyulieth-PaymentIntent

1 messages ยท Page 1 of 1 (latest)

rapid mural
hardy timber
#

Thanks you for answer me

#

The example in my java code does not work

#

this part:

#

PaymentIntentCreateParams params =
PaymentIntentCreateParams.builder()
.setAmount(new Long(calculateOrderAmount(postBody.getItems())))
.setCurrency("eur")
.setAutomaticPaymentMethods(
PaymentIntentCreateParams.AutomaticPaymentMethods
.builder()
.setEnabled(true)
.build()
)
.build();

#

in this page:

#

Configure payment methods

#

AutomaticPaymentMethods cannot be resolved or is not a field.

rapid mural
#

Taking a look here

#

Which version of Stripe Java do you have?

hardy timber
#

Today I put <version>20.120.0</version>

#

in the pom,

#

I had paymentMethodTypes but I need to change to automatic_payment_methods

#

This is the suggestion of Stripe

#

But does not work.

rapid mural
#

I just tested this on my own and the above code does work with version 20.120.0. It looks like you might be on an older version and that an update is needed.

hardy timber
#

Oh Sorry

#

I changed the version of Stripe

#

but I don't clean the project.

#

I clean the project and work

#

๐Ÿ˜…

manic rock
#

fun fact: I was also testing and thought I had upgraded but I forgot to rename my jar so it was building with the old one and I thought it was broken too ๐Ÿ˜น

hardy timber
#

Jaja

#

Thanks for your help. a lot of times happen that I talk with someone and I found the solution

manic rock
#

๐Ÿ™‚