You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If currency is changed and button clicked, UI tries to open the paypal secure browser and then fails with error: Expected currency from order api call to be EUR, got USD. Please ensure you are passing currency=USD to the sdk url.
Do I maybe need to wait for some amount of time between unmount and remount of the component or it is some other issue.
Note: when button is submitted we are sending the data to our api where latest plan with latest currency is used and they return us the action needed.
To Reproduce
Steps to reproduce the behavior:
Mount paypal component with some currency variable have "EUR" value
Change currency variable from "EUR" to "USD"
Unmount existing paypal component
Create and mount new paypal component with "USD" currency
Submit button and do api call to get the action
Provide action to mounted paypal component
You will get error Expected currency from order api call to be EUR, got USD. Please ensure you are passing currency=USD to the sdk url.
Expected behavior
Paypal component should open the secure browser with the USD currency plan
The text was updated successfully, but these errors were encountered:
almirakrdzic1991
changed the title
Paypal component not refreshing changed currency
Paypal component not refreshing changed currency and fails on submit
Aug 24, 2020
I have form with country selector and paypal smart button.
Change of the country will cause change of the currency and price.
I have written to the support and they said to umount and mount the component again to refresh the currency, so I did that.
Here is my code for it:
If currency is changed and button clicked, UI tries to open the paypal secure browser and then fails with error:
Expected currency from order api call to be EUR, got USD. Please ensure you are passing currency=USD to the sdk url.
Do I maybe need to wait for some amount of time between unmount and remount of the component or it is some other issue.
Note: when button is submitted we are sending the data to our api where latest plan with latest currency is used and they return us the action needed.
To Reproduce
Steps to reproduce the behavior:
Expected currency from order api call to be EUR, got USD. Please ensure you are passing currency=USD to the sdk url.
Expected behavior
Paypal component should open the secure browser with the USD currency plan
Screenshots
Additional context
Version: checkoutshopper/sdk/3.11.0
The text was updated successfully, but these errors were encountered: