#Stone.D
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
taking a look at the request
as per the request's error message
you just need to add the customer_update[shipping] parameter to your request
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
since the customer in question doesn't have a shipping address
I use builder = new SessionCreateParams.Builder()
.setSuccessUrl(successUrl)
.setCancelUrl(cancelUrl)
.setPaymentIntentData(
SessionCreateParams.PaymentIntentData.builder()
.setReceiptEmail(user.getEmail())
.setSetupFutureUsage(SessionCreateParams.PaymentIntentData.SetupFutureUsage.OFF_SESSION)
.build()
)
.setShippingAddressCollection(shippingBuilder.build())
.setMode(SessionCreateParams.Mode.PAYMENT)
.setAutomaticTax(
SessionCreateParams.AutomaticTax.builder()
.setEnabled(true)
.build());
I don't know how to do that.
SessionCreateParams.ShippingAddressCollection.Builder shippingBuilder =
SessionCreateParams.ShippingAddressCollection.builder().addAllAllowedCountry(Arrays.asList(SessionCreateParams.ShippingAddressCollection.AllowedCountry.values()));
I did not use the map method, but the builder method. I don't know how to set up in builder mode
I am tring as your suggestion.
sorry I'm trying to find the right function to add that parameter in our Java SDK
this is the function you need to use
setCustomerUpdate
Yes , it works
perfect
they won't work unless you collect shipping address since you have automatic_tax.enabled on your checkout session
This is my snippet: builder = new SessionCreateParams.Builder()
.setSuccessUrl(successUrl)
.setCancelUrl(cancelUrl)
.setPaymentIntentData(
SessionCreateParams.PaymentIntentData.builder()
.setReceiptEmail(user.getEmail())
.setSetupFutureUsage(SessionCreateParams.PaymentIntentData.SetupFutureUsage.OFF_SESSION)
.build()
)
// .setShippingAddressCollection(shippingBuilder.build())
.setCustomerUpdate(SessionCreateParams.CustomerUpdate.builder().setShipping(SessionCreateParams.CustomerUpdate.Shipping.AUTO).build())
.setMode(SessionCreateParams.Mode.PAYMENT)
.setAutomaticTax(
SessionCreateParams.AutomaticTax.builder()
.setEnabled(true)
.build());
}
seems ok
could you please share the new url?
there's something weird
in your request it's mentioning customer_update.nameand customer_update.address instead of shipping
could you please retry
generating a new checkout session
OK
could you please recopy the code you executed?
.setCustomerUpdate(SessionCreateParams.CustomerUpdate.builder().setAddress(Address.AUTO).setName(Name.AUTO).build())```
this is wrong
you should uncomment the first one
yes
no actually
what you're doing here is overriding the first CustomerUpdate object with the second
.setCustomerUpdate(SessionCreateParams.CustomerUpdate.builder().setAddress(Address.AUTO).setName(Name.AUTO).setShipping(SessionCreateParams.CustomerUpdate.Shipping.AUTO).build())
this should be your only line for setCustomerUpdate
Use this code:.setCustomerUpdate(SessionCreateParams.CustomerUpdate.builder().setAddress(Address.AUTO).setName(Name.AUTO).setShipping(SessionCreateParams.CustomerUpdate.Shipping.AUTO).build())
I'm not sure what's happening but the code you're using is not setting shipping: auto on Customer Update
you need to debug your code and try to find at which level this is happening
Ok, let me review this code.
This is the whole funcation code.
I can't read some issue.
Looking in to the proper code to do this with builders. It shouldn't be too different than what you have
Whether it has anything to do with us in mainland China, because it does not support google pay.
Does it have something to do with the settings on the dashboard?
Can we continue tomorrow? A bit late for my region.
Yes we can, I will try to figure those out and send a message in this thread if I figure it out
If so, thank you very much.