I have implemented the paypal smart buttons inside a vue.js component (don't think this matters) so that I can access my global vuex data for use in creating the buttons. Here is my code, I have a short helper function that I reuse to generate the JSON for the create order request and also in the onShippingChange handler.
The issue I am having is that the "Review your payment" does not display the changes in the patch until I refresh the page. I would have expected the page to update after the patch request is complete.
generation_paypal_buttons() is called when my vue.js component is mounted()...
So basically what happens is that I have 2 test addresses, one with a post code 3350, one with a post code 7000. 3350 shipping is equal to $40 and 7000 shipping is $80. When I change addresses to 3350, I see a new order value that includes $80 and when I change to 7000, I see $40.... which suggests to me that the patch operation works (on the paypal server), but it is not reflected immediately in the client window.
If you have any suggestions, please let me know... Thankyou.