#jakub_50765

1 messages · Page 1 of 1 (latest)

dusky sandBOT
#

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.

wanton cloud
#

I haven't tested this myself but what happens when you don't pass a payload to resolve?

high gale
#

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

wanton cloud
#

Gotcha. Out of curiosity, what are you using the click event for?

high gale
#

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

wanton cloud
#

You could refactor your AJAX to run after confirmPayment has been called

high gale
#

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?

wanton cloud
#

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

high gale
#

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

wanton cloud
#

yup, rough estimate based on geolocation makes sense as a workaround.