• Resolved markiljas

    (@markiljas)


    Hello,

    I’ve been having trouble recently with some PayPal payments, we introduced USD to our merchant account, so we can accept both USD and EUR. However, I have been getting warnings when a customer from the US tries to use PayPal, because it shows him price in USD, but apparently reports the amount in EUR, even though we have both enabled in PayPal and Braintree settings. I’ve reached out to Braintree and they have explained the following:

    “I’ve taken a look at your declined PayPal transactions in USD and noticed that these transactions were declined with the response message 2091 – The currency of this PayPal transaction must match the currency of the merchant account. This response code means the currency code in your client-side PayPal codes doesn’t match the currency of the merchant account in your server-side Transaction Sale call.

    For example, the transaction 4tq069cq was declined due to this currency mismatch response. Looking at your logs, I see that your client-side integration passed the currency code EUR with the currency parameter in your client-side integration. However, the USD merchant account amaranthinebooksUSD was passed in your Transaction Sale call, which explains why this transaction was declined.

    If you’d like to process PayPal payments in USD currency, you need to make sure that the currency code USD is passed in your client-side codes, so passing a USD merchant account with your server-side Transaction Sale call alone would not be enough.”

    How can I accept both currencies? Couldn’t figure out is there some option in the settings.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hello @markiljas,

    Did you install a currency switcher plugin as well? You will need that to make everything work.

    Make sure you go to the plugin’s merchant account settings and click the import button.

    When a customer selects the currency they wish to check out with, the currency switcher plug-in hooks into the woocommerce currency function. Our plug-in then finds the matching merchant account for the current currency and uses that.

    Kind regards

    Thread Starter markiljas

    (@markiljas)

    Hello,

    Thanks for a quick response!

    Yep, I installed WooCommerce Price Based on Country, it detects if someone is from the US and adjusts the currency automatically. It works great for cards, it’s just PayPal that shows issues with that for some reason. Could it be that there is a clash with that? But then again, why would it work with cards, but not PayPal?

    Kind regards

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas,

    Is this happening on the checkout page for PayPal or on product pages, or cart page or all?

    I am wondering if that Price Based plugin only works only hooks in to the currency filter when the checkout page is active.

    Kind Regards,

    Thread Starter markiljas

    (@markiljas)

    I’m not sure, HotJar didn’t record that attempt so can’t see and the customer didn’t reply to my email, so I guess he gave up. I only have PayPal available on Product and Checkout page, so I guess that narrows it down to only those two options. But since it was a rather expensive order I assume he went through the whole process to the checkout to confirm the shipping info etc.

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas you mentioned that credit cards were working fine. Can you check in the Braintree control panel for a credit card transaction in USD and see which merchant account was used?

    I have a feeling your EUR account was used even for the USD order and Braintree is doing the conversion for you on their end since it’s a non PayPal order and EUR is to it default merchant currency.

    Thread Starter markiljas

    (@markiljas)

    I just checked it, it used my USD merchant account, payment came normally in USD without any conversion. I even asked them earlier if the credit cards might be affected by this error as well, but this is what they said:

    “Thanks for reaching back out!

    That is indeed correct. This is an issue with your client-side integration passing a wrong currency with the currency parameter, so the developer of the plugin should be able to help. The currency code that’s passed with the client-side currency parameter must match the currency of the merchant account in your server-side Transaction Sale call.

    QUOTE: Is it also affecting normal card payments via Braintree?

    This wouldn’t affect card payments as you don’t need to specify a currency code on the client-side with card payments. With card payments, the currency is controlled by your merchant accounts alone and your integration is passing the correct merchant accounts with your transactions.

    I hope that helps! Feel free to give us a shout if there’s any further assistance we can provide.”

    Does this info help?

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas,

    Thanks for that info. So we have narrowed down that the correct merchant account is being sent for cards but not PayPal. Cards are only offered on the checkout page so that potentially points to it being related to PayPal on the product page.

    Can you create two test orders in the USD currency using your personal PayPal account (not your business account). Order one will be from the product page and order two will be from the checkout page. Do yo get the error on one, both or none of the pages?

    Kind Regards,

    Thread Starter markiljas

    (@markiljas)

    Gotcha! Unfortunately, I do not have a personal PayPal account, but I went and copied my site to the sandbox site. There I managed to test the checkout via sandbox account and it worked!

    However, since it is a sandbox account, the product page didn’t work for some reason (some elements fail to load, including PayPal button), but I’ve decided to remove the product PayPal button from a live site anyway. The only question is can I somehow check if it works now on the production site without having a private PayPal account?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @markiljas,

    The way you can test on your production site is make sure the USD currency is being used on your checkout page. Then click F12 using Chrome and select the elements tab.

    Type in “wc_braintree_merchant_account” and see what value appears. That’s the merchant account the plugin uses. If it’s your USD merchant account then you know it will work.

    Kind Regards,

    Thread Starter markiljas

    (@markiljas)

    I tried and it indeed says that it is using USD merchant account!

    However, I quickly enabled the product page PayPal button again and did the same there, but it also says the same:
    <input> id=c_braintree_merchant_account” type=”hidden”
    value=”NAMEOFMYUSDMERCHANTACCOUNT”>

    So I’m confused as to what does that mean for the error 😅

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas thats really interesting. So we know that the correct merchant account is used server side and the issue was with the client side call using the EUR account when it should have been the USD account.

    But you confirmed it showed correctly for you on the product page. It looks to me like an intermittent error. Have you been getting other USD PayPal orders that are successful?

    Kind regards,

    Thread Starter markiljas

    (@markiljas)

    Yes, seems so… As far as I can see, the last successful PayPal USD order was on 8th of February. In the mean time I had 4 failed PayPal orders from three different people with that specific error.

    Interestingly enough, I just noticed that one of those failures was from a customer in UK, but that is odd because UK customers are defaulted to EUR currency as we do not accept GBP, so there is no currency detection. So not only does it seem intermittent, but also not bound to USD (even though 3 out of 4 errors are with USD transactions).

    Kind regards

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas,

    Can you send the link to the currency plugin you are using? I don’t believe this is an issue with our plugin because I don’t have any other reports of this happening.

    Kind Regards,

    Thread Starter markiljas

    (@markiljas)

    Of course, this is the plugin: https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/

    Also, figured out there is an error log of that last transaction, so maybe that helps (the log is filled with errors from today, but we had some fraud attempts as well), I omitted personal data obviously:

    2020-02-25T04:47:26+00:00 INFO Processing payment for order 19999. Transaction args: Array
    (
    [amount] => 839.00
    [taxAmount] => 0
    [shippingAmount] => 0.00
    [discountAmount] => 0
    [customer] => Array
    (
    [firstName] => ***OMITTED***
    [lastName] => ***OMITTED***
    [phone] => ***OMITTED***
    [email] => ***OMITTED***
    [company] =>
    )

    [orderId] => 19999
    [billing] => Array
    (
    [firstName] => ***OMITTED***
    [lastName] => ***OMITTED***
    [locality] => ***OMITTED***
    [postalCode] => ***OMITTED***
    [region] => ***OMITTED***
    [streetAddress] => ***OMITTED***
    [extendedAddress] =>
    [countryCodeAlpha2] => US
    )

    [shipping] => Array
    (
    [firstName] => ***OMITTED***
    [lastName] => ***OMITTED***
    [locality] => ***OMITTED***
    [postalCode] => ***OMITTED***
    [region] => ***OMITTED***
    [streetAddress] => ***OMITTED***
    [extendedAddress] =>
    [countryCodeAlpha2] => US
    )

    [merchantAccountId] => amaranthinebooksUSD
    [channel] => PaymentPlugins_BT
    [options] => Array
    (
    [submitForSettlement] => 1
    [storeInVaultOnSuccess] =>
    )

    [descriptor] => Array
    (
    )

    [deviceData] => {“device_session_id”:”d5438a47a21f03ae54958b5d99a4b252″,”fraud_merchant_id”:”600000″,”correlation_id”:”9a55cd61bda934c0ce9b1488ba947699″}
    [paymentMethodNonce] => 1aba55ab-f618-05e4-ed3c-9e7c46e1839b
    )

    Thank you so much for looking into this!

    Plugin Author Payment Plugins

    (@mrclayton)

    @markiljas,

    I tested the plugin and it chose the correct merchant account every time based on my geo-location. I tested USD and EUR without any issues.

    Were these new or returning customers? Here is a possible scenario: The customer attempted to purchase the product from your product page and it is a digital product so there were some required fields missing. They clicked the “Click here to finish your order” where they were redirected to the checkout page. From there, they changed their billing information to the United States (or whatever currency zone you have configured for USD). They then placed the order and our plugin saw USD, and sent your USD merchant account. However, the payment nonce which was generated on the product page was in EUR so it causes a mismatch.

    I am betting that is what happened.

    The plugin you are using attempts to find the customer’s currency from their billing country first, then a cookie in their browser, then based on their IP address. So if the customer did anything between attempting to purchase on product page that affected the currency that could cause a mis-match.

    Kind Regards,

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘PayPal Error’ is closed to new replies.