magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Paypal Pro currency issue

Open HongMarketingInc opened this issue 9 years ago • 65 comments

Preconditions

  1. Magento CE 2.1.2
  2. Setup two websites, each one has its own Paypal Pro account.
  3. Setup base currency as CAD for each website
  4. Product currency is CAD

Steps to reproduce

  1. Go to the 1st website (main website), place an order (CAD $10.00) by using Paypal Pro payment, both Magento and Paypal show the amount in CAD
  2. Go to the 2nd website, place an order (CAD $10.00) by using Paypal Pro payment, Magento shows CAD10.00, but Paypal actually charge the customer USD $10.00.

Expected result

  1. The customer should be charged in CAD on the 2nd website

Actual result

  1. The customer is charged in USD on the 2nd website

HongMarketingInc avatar Dec 28 '16 06:12 HongMarketingInc

Hi @HongMarketingInc

Have you used different Paypal Pro accounts for websites? PayPal can show USD instead of CAD when Paypal Pro account does not support Canadian Dollars. In this case you will need to contact PayPal support for enabling Canadian Dollars support for account.

alena-marchenko avatar Jan 23 '17 11:01 alena-marchenko

Yes, each website has its own paypal pro account. Each account's primary currency is CAD.

I can confirm that the client is charged by USD.

HongMarketingInc avatar Jan 24 '17 04:01 HongMarketingInc

I'm having the same issue, except it's charging in USD for all websites. I called PayPal and they said it's an issue with the API call.

I ran the debug in my PayPal settings and I have confirmed that when I use PayPal Express checkout, the API call specifies the CAD currency and the end result is that it works correctly. On the other hand, when I use Website Payments Pro, it doesn't doesn't specify any currency at all during the API call and the customer is charged in USD.

Could this be the issue?

KalebHosie avatar Feb 06 '17 23:02 KalebHosie

Referenced in 1c7f70d

app/code/Magento/Paypal/Test/Unit/Model/Payflow/TransparentTest.php Line 169: + ->willReturn('USD');

Maybe if we (Canadian Sellers) change that line to read CAD, the correct currency will be sent?

gooki avatar Feb 09 '17 20:02 gooki

@gooki That's good thinking but sadly I already tried that with no luck.

KalebHosie avatar Feb 09 '17 20:02 KalebHosie

There has been a lot of communication on this subject using issue #6929 and there is a lot of missing information on this thread.

To provide an update for anyone new that can help us or is experiencing the same issue, here is a summary.

  • When using PayPal Website Payments Pro, it always charges in USD and not the default currency we chose (in this case, CAD $)

  • The API call for PayPal Website Payments Pro & PayFlow Pro is not sending the currency to PayPal which leaves me assuming that PayPal defaults to charging in USD.

  • Magento 2.1.4 was released on February 7 2017 which says it resolves the following issue however according to our tests, nothing has changed:

PayPal Payflow Pro now uses the currency you’ve specified in your store settings. Previously, Magento converted the total price into U.S. dollars, no matter which currency was specified in the store

Ultimately, we need to find a way to charge credit cards on our websites in our own currency.

All help is greatly appreciated!

KalebHosie avatar Feb 09 '17 22:02 KalebHosie

@supanatral +1 Plus zero amount being sent (or is a consequence of the wrong currency being posted)

gooki avatar Feb 11 '17 14:02 gooki

@HongMarketingInc did you resolve this?

@gooki the API call does a $0 charge and to see if the credit card is approved, it will do a second API call with the final amount. This seems overly redundant to me but it does work.

KalebHosie avatar Feb 11 '17 19:02 KalebHosie

@gooki I've posted an ad on Upwork to hire a developer to fix this issue. I hope to report back with the coding changes required.

KalebHosie avatar Feb 11 '17 19:02 KalebHosie

@supanatral great let me know how much it will be or a link to the ad, I can share the cost if necessary

gooki avatar Feb 12 '17 18:02 gooki

@gooki you are a gentleman and a scholar! No worries though :)

I just finished hiring the developer about 1hr ago who will start working on the issue in about 12 hours from now. I've asked him to report his finding and big fix on Github so the entire community can benefit.

KalebHosie avatar Feb 12 '17 18:02 KalebHosie

@supanatral sweet, can't wait

gooki avatar Feb 13 '17 00:02 gooki

@supanatral Any news on this buddy?

gooki avatar Feb 18 '17 18:02 gooki

No update on the developers side. Hope to have an update soon on that.

I tried setting up a new v2.1.4 dev test site with sample data and tried it out without the use of 3rd party plugins. I changed the currency to CAD and setup PayPal. In the end, the API call didn't call for the CAD currency and it was still billed in USD.

KalebHosie avatar Feb 19 '17 14:02 KalebHosie

I just discovered another thread regarding this issue and it appears that the person found a temporary work around #7719

I don't have time to test it because I'm about to run out

KalebHosie avatar Feb 19 '17 14:02 KalebHosie

@gooki I have tested it and i seems like @H3dz findings were correct.

If you add "$request->setCurrency('CAD'); // Hardcoded to CAD" to line 627, it appears to fix the problem.

Of course, this is not an ideal solution but it should work at least

KalebHosie avatar Feb 19 '17 22:02 KalebHosie

Hi,

That fix did change my currency to CAD but I still get an error and in my payflow logs see that it is authorising with $0.00 amount.

Any ideas why it would do that?

hubaig avatar Feb 22 '17 00:02 hubaig

@hubaig great to hear it worked. I tried finding a better solution but so far I've been unable to.

Magento authorizes $0 to make sure the credit card is valid. Once it gets a confirmation it's valid, it sends the full amount of the order. There's no doubt that it's overly redundant but it works so I cannot complain

KalebHosie avatar Feb 22 '17 00:02 KalebHosie

@supanatral I am actually trying to make a sale not an authorizaiton.

My Payment Action: is set to Sale in Magento. Not sure why it is authorizing instead of a sale. Any ideas?

hubaig avatar Feb 22 '17 00:02 hubaig

@supanatral

Has your programmer fixed it?

HongMarketingInc avatar Feb 22 '17 00:02 HongMarketingInc