#jakub_50765
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jakub_50765, 6 hours ago, 19 messages
I haven't tested this myself but what happens when you don't pass a payload to resolve?
unfortunately it fails because shipping rates in payload are required
shippingAddressRequired - If true, you must also supply a valid shippingRates option.
I set shippingAddressRequired = true as we need shipping address
Gotcha. Out of curiosity, what are you using the click event for?
you know after 'resolve' call I call our AJAX to initiate payment on our side 😉
as far as I remember, event 'click' and call 'resolve' is even required
don't think you "need" to listen click event, really
https://stripe.com/docs/elements/express-checkout-element/accept-a-payment
Clicking on the wallet buttons should initiate the confirmPayment flow
You could refactor your AJAX to run after confirmPayment has been called
ok but I need somehow to set that I need billing and shipping addresses, I use click.resolve function for it, shippingAddressRequired and billingAddressRequired, is there any other way how to do that?
oh yeah good point
you're right, you'd need to use the click event for this.
I was thinking about a different flow where you can set shippingAddressRequired directly on the payment request object which doesn't really work for express checkout element
I guess the workaround you currently have is what you'd need for now. I can file in a feature request to make shippingRates optional
I don't know why the product decision was made where we had to make it required
yeh, it is a bit weird at that stage of click event - you know we are able to identify customer country based on his IP address and we have default post code for each country so it makes sense to me to send temporarily shipping rates based on these values
before we get real address
yup, rough estimate based on geolocation makes sense as a workaround.