Open HongMarketingInc opened 7 years ago
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.
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.
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?
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 That's good thinking but sadly I already tried that with no luck.
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!
@supanatral +1 Plus zero amount being sent (or is a consequence of the wrong currency being posted)
@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.
@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.
@supanatral great let me know how much it will be or a link to the ad, I can share the cost if necessary
@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.
@supanatral sweet, can't wait
@supanatral Any news on this buddy?
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.
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
@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
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 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
@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?
@supanatral
Has your programmer fixed it?
@hubaig My payment is set to sale as well. It appears to authorize $0 and when it gets approved, it charges the full amount.
As I said, there's no doubt this is incredibly redundant and very much unnecessary but at least it works.
My programmer hasn't seemed to figure out the fix as of yet :S
Mine never ends up creating a sale. Just gives up at authorization.
@hubaig Strange! Does your front end supporting both PayPal express checkout AND PayPal website payments pro? I'm not looking at the config interface but are you sure that both payment methods (express and payments pro) are set to "sale"?
Sorry if my reply is overly basic.
yes they both are set to sale. I am updating to 2.1.5 as it just came out. Lets see if it fixes anything.
The changes won't do anything. Here's the release notes: "This release updates the copyright date in every file. It does not contain any functional changes or security improvements. Isolating these changes in a single release is intended to simplify future updates and developer workflow."
Which currency do you use as a base currency? Is there any other error that is shown?
My base currency is CAD. Right now my store is at 2.1.1. So upgrading to 2.1.5 would provide some sort of functional/security changes though.
Upgraded to version 2.1.4 still no luck :( not sure why it won't work.
making progress. I am getting an auth and a sale now. However the same declines due to this:
Result Code: 117 Response Message: Failed merchant rule check
According to THIS this is due to the security settings. I have softened my settings a bit and have set them all to no and it still fails.
Never ends.
@hubaig Does this work? http://therealdanvega.com/blog/2013/11/29/paypal-payflowpro-result117-failed-merchant-rule-check
Sounds like your getting farther at least.
@supanatral I was up late night figuring this out and got it all fixed. I am now able to charge credit cards for the first time. Funny thing was that when I finished with the fix, an order came within 5 minutes. God knows how much revenue I have lost due to this problem.
For the record, I did stumble upon this blog entry you mentioned last night and that was the fixed that I required on top of the hard coding of the CAD currency mentioned above.
Regards,
@hubaig @supanatral
I don't know what I'm doing wrong then. I'm still getting the invalid merchant information error. Would you guys be able to post your complete backend paypal settings and also paypal manager settings. (minus confidential stuff of course). I want to make sure I'm doing apples to apples. I am getting the proper currency now but that's about it. I have the allow reference transactions on as well.
I have same error. I have upgraded to Magento 2.1.4 and 2.1.5 But it still not work. On Basic Settings - PayPal Payments Pro. I setup Payment Action = Sale
Here are solution to fixed this problem. See more detail this error at https://bestcodestore.com/magento-2-paypal-payments-pro-wrong-currency/
This problem appeared with ( PayPal Payments Pro. I setup Payment Action = Sale ).
vendor/magento/module-paypal/Model/Payflowpro.php public function buildBasicRequest( ) { // line 627: $currencyCode = \Magento\Framework\App\ObjectManager::getInstance()->create('\Magento\Store\Model\StoreManagerInterface')->getStore()->getCurrentCurrency()->getCode(); $request->setCurrency( $currencyCode );
} It work now. You can temporarily use it while waiting magento update.
After doing the above changes and having paypal change our currency on their end to CAD we finally were able to process a payment. I do not know if it is due to us changing the above and the paypal change or just because of the paypal change. I think it is because of both.
This does seem to work as a workaround, but has some pretty significant limitations. `vendor/magento/module-paypal/Model/Payflowpro.php public function buildBasicRequest( ) { // line 627: $currencyCode = \Magento\Framework\App\ObjectManager::getInstance()->create('\Magento\Store\Model\StoreManagerInterface')->getStore()->getCurrentCurrency()->getCode(); $request->setCurrency( $currencyCode );
}`
It fails if you are trying to use the authorization payment type, which is my preferred way to take order. The problem appears to be that Magento does not send a currency code to Paypal on the $0 authorization. Paypal assumes that the $0 is in your account's default currency, then when a transaction comes through with a different currency it causes an error.
It also will not allow any refunds to be processed. I assume this is because when you are processing a refund from admin getCurrentCurrency is taking the default currency from the admin standpoint not the currency the order was placed in.
Hopefully Magento will sort this out sooner than later. I would rather not have to pay someone to develop a custom solution to this.
I have a working solution to this issue that seems to allow all functionality to behave as expected.
I transact sales in CAD and USD. Our main PayPal account is based in CAD.
I opened a second PayPal account and set the default currency to USD. I connected this account to our US store and now everything seems to work properly. I am paying for a second PayPal account, but that is cheaper than paying a developer to fix the core code.
So I am on Magento 2.2.2 and received 3 sales and they are in USD? Is this issue still not fixed after more than a year? Magento currency is setup as CAD, we are using a Canadian PayPal account with Website Payments Pro / PayFlow Pro.
What happens is $0 authorization and then USD charge for the full amount.
Contacted PayPal, they said it is API issue.
I only have 1 site, not 2.
Any fix that can be applied?
Thanks!
We have tried to hardcode CAD on line 627, getting Payment Cannot be Processed error, and billing details disappear from the checkout page. Does anyone have a working solution for Magento 2.2.2?
Any update from anyone on this?
any solution for this?
Not that I am aware of. We had to stop using the site until it is resolved. Awesome.
Files changed (1)
File vendor/magento/module-paypal/Model/Payflowpro.php MODIFIED Side-by-side diff View file https://bitbucket.org/hmihmi/maplewellness/src/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c/vendor/magento/module-paypal/Model/Payflowpro.php
Comment
More https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF624T624
$request->setVerbosity($this->getConfigData('verbosity'));
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF625T625
$request->setData('BUTTONSOURCE', $config->getBuildNotationCode());
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF626T626
$request->setTender(self::TENDER_CC);
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpT627
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpT628
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpT629
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF627T630
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF628T631
return $request;
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF629T632
}
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF630T633
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF631T634
/**
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF632T635
* If response is failed throw exception
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF633T636
*
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF634T637
* @param DataObject $response
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF635T638
* @return void
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF636T639
* @throws \Magento\Framework\Exception\LocalizedException
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF637T640
* @throws \Magento\Framework\Exception\State\InvalidTransitionException
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF638T641
*/
https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#add-comment https://bitbucket.org/hmihmi/maplewellness/commits/c7b2c10c279c1e73b71c2ff9c52736a6f653ce6c#Lvendor/magento/module-paypal/Model/Payflowpro.phpF639T642
public function processErrors(DataObject $response)
On Wed, Apr 18, 2018 at 3:37 PM, Grumag notifications@github.com wrote:
Not that I am aware of. We had to stop using the site until it is resolved. Awesome.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/7977#issuecomment-382550826, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIRtUAzbP0apiW6e0Meoh7IG2YbsXVdks5tp8AlgaJpZM4LWsj9 .
-- Best Regards, Henry Zou
Hi Guys,
recently we have migrated from m1 to magento 2.2.2 and using paypal payflow have got strange issue some trasactions are showing in USD in paypal manager and some are in cad however default and allowed both currency is in CAD.
It would be great if you guys have any suggestion to fix this issue.
Issue persists in 2.2.4. Maybe Adobe puts some money into Magento now and actually fixes the gazillion bugs.
@Grumag which currency is your default currency
Base Currency: Canadian Dollar Default Display Currency: Canadian Dollar Allowed Currencies: Canadian Dollar
@magento-engcom-team Any progress on this? In the 2.2.5 release notes I see
Payment methods
In multistore environments, Magento now retrieves the correct PayPal Payflow Pro credentials. Previously, Magento always retrieved the credentials that are configured for the default store.
Does that fix this issue? If so what is the pull request number, or commit hash with the fix?
Tested 2.2.5 in Single Store mode, Canadian store and PayPal, still charging USD.
Don't bother..
Try to change default tax destination in Admin->Store->Configuration->Sales->Tax->Default Tax Destination->Default Country
To Canada
Hi amauni, it is already Canada. If you require screenshots, videos, settings, $$$ let me know I will send.
Preconditions
Steps to reproduce
Expected result
Actual result