paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
238 stars 83 forks source link

[Bug] PayPalButtons onShippingAddressChange not able to update shipping costs #538

Open jqrn opened 4 months ago

jqrn commented 4 months ago

Library used

react-paypal-js

🐞 Describe the Bug

The docs for PayPalButtons onShippingAddressChange state that it can be used to update shipping costs after the buyer has selected an address in PayPal:


image

However, unlike the now-deprecated onShippingChange, onShippingAddressChange does not provide a data.actions.order.patch() that can be used to patch the order with the new shipping costs. It only provides a reject method for when the new address isn't one the seller can support.

After an order is first created via PayPalButtons createOrder (actions.order.create()), and then the buyer has logged into PayPal and selected their shipping address, how can we update the order with the shipping cost recalculated using the buyer's address?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

chowey commented 1 month ago

This is still an issue.

ederoyd46 commented 6 days ago

Is there an update on when this issue will be resolved?

This is affecting one of our customers. They require the shipping methods to be updated when an address is entered, this works fine for existing Paypal users as the call back is triggered. However when signing up for a new account or using it in the guest flow, the call back is not triggered to update the shipping methods and so the order validation fails.