• Resolved daniidevv

    (@daniidevv)


    Hi, I have an error with your latest version of Paypal Payments, I have a third-party dashboard that creates an order in three currencies, EUR, GBP and USD. My store’s base currency is USD, when the order has been created from the dashboard and redirects to the checkout with all the customer information and the currency being displayed in the selected currency, now the only problem is that when I try to checkout with the paypal button, paypal gives this error:

    Error: Expected currency from order api call to be USD, got EUR. Please ensure you are passing currency=EUR to the sdk url.

    I need to know how I can change the paypal currency same as the currency shown in the order summary on checkout, this is really urgent, If there is a custom workaround for this, please let me know. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @daniidevv

    Which currency is requested in the query URL is decided on page load.
    If you are using any functions to modify the checkout currency after the initial page load, then this may result in a currency mismatch when creating the PayPal order.

    So ideally, during the page load of the Checkout page, you would want the correct currency to be set already.

    But could you please share more details with us regarding how you are modifying the currency for these orders?
    If we can find a way to reproduce this behavior, we can maybe suggest a potential workaround.

    Thanks!

    Kind regards,
    Niklas

    Thread Starter daniidevv

    (@daniidevv)

    Hi @niklasinpsyde, thank you for replying. I can describe the flow to you, as I’m not allowed to share any details.

    So there is a dashboard that creates a custom woocommerce order with an API, at the last step they are requested to select the currency they want to pay the order with, there are three currencies customer can select: USD, EUR and GBP, after the selection, the order is created with that currency and at last It generates a link like this:

    https://example.com/checkout/order-pay/2556/?pay_for_order=true&key=wc_order_7xnak65aksjak

    When the customer is redirected to this link, they land on the website to complete the checkout process, now everything is fine, just the paypal generates that error, because paypal captures the store’s base currency, which is USD, so when the order is created in EUR, for example. It generates an error of currency mismatch.

    So what I would like, through a custom code or a plugin you suggest, that I can redirect a parameter from the dashboard through that generated link and when the customer lands on the page, paypal’s currency matches the checkout order currency, maybe something like this:

    “currency=EUR”

    https://example.com/checkout/order-pay/2556/?pay_for_order=true&key=wc_order_7xnak65aksjak&currency=EUR

    Please If you could tell me a customized solution for this, If not, a plugin would work too. It would solve a huge problem for me, I just need the parameter to change the paypal’s currency that’s it, rest I will manage.

    Thank you!

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @daniidevv,

    Thanks for the details.
    I was able to reproduce the behavior when creating an order in one currency, but then switching the WooCommerce store currency to another one. So this cis a bug and not something that should be worked around externally. When paying for an already existing order, the order currency should always be used instead of the store currency.
    This scenario appears to be working for other payment methods such as Advanced Card Payments, but not with the PayPal smart buttons.

    For most basic applications, PayPal Payments works in multi-currency setups, e.g. with a currency switcher on pages without the smart buttons. But multi-currency is not yet officially supported, as there is certainly room for improvement regarding how multi-currency configurations or some edge cases are treated.

    Regardless, the team will investigate the behavior and improve it with one of the next updates. So your feedback is highly appreciated. When there is new information available, we’ll try to let you know.

    Kind regards,
    Niklas

    Thread Starter daniidevv

    (@daniidevv)

    Hi @niklasinpsyde , thank you for your insight on this issue, I would like to follow up, If I can expect a resolution for this bug in the next update, as this is a major drawback for me right now and It’s a really simple feature, If you could simply update the plugin to pickup the order currency rather than the store currency, this would resolve a huge headache for me and If you could tell me a timeline as to when this will be resolved, I’d appreciate that. Thank you so much.

    • This reply was modified 1 year, 8 months ago by daniidevv.
    • This reply was modified 1 year, 8 months ago by daniidevv.
    • This reply was modified 1 year, 8 months ago by daniidevv.
    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @daniidevv

    Thanks for your patience. And apologies that it took a moment for us to investigate this.
    This PR contains the changes that should resolve the use case you mentioned. We can share a test package once the review and basic tests are completed if you are not comfortable manually testing the adjustments to the file yourself.

    If you give it a try, please let us know how this works for you.
    Thanks!

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    We have not heard from you in a while, so I’m marking this thread as resolved.
    Hopefully, the above information helped you out. We can still provide a test package with this change whenever needed before this will eventually find its way into the core plugin.
    If you have any further questions, please feel free to reopen this topic or create a new one.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error: Expected currency from order api call to be USD, got EUR.’ is closed to new replies.