magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.31k forks source link

PayPal Module - Canada - Tax Issue - Not Recognized State/Province: Newfoundland #15506

Closed nikoelgatito closed 6 years ago

nikoelgatito commented 6 years ago

When placing an order with a PayPal account using a shipping address within the Newfoundland province, Magento does not recognize the region and does not apply the sales tax. This is caused by the fact that Magento doesn't recognize the previous province name that had changed from "Newfoundland" to "Newfoundland & Labrador" and all PayPal accounts that had an address created before PayPal actually updated the province name are all affected.

Preconditions

This is easily replicable on any Magento version 1.9.X or 2.X.

  1. Have a PayPal account with a Newfoundland address that has been created before the name of the province has changed to "Newfoundland & Labrador".
  2. Make sure the tax configuration is set correctly for the Canadian Newfoundland & Labrador province through Magento.
  3. Sales tax should be configured to be calculated based on the shipping address.

Steps to reproduce

  1. Place an order with the PayPal account shipping address set to the Newfoundland address.

Expected result

Actual result

Temporary solution

Ask the customer to create a new PayPal address which will use the new province name via the PayPal address creation form.

Possible permanent solutions

  1. As this issue is specific to PayPal, as the simplest solution it might be worth adding a hardcoded reference to the previous province name as a fallback.

  2. We already contacted PayPal regarding this issue 2 years ago and nothing has been done on their end. We would have hoped that PayPal would simply have updated their database forcing all addresses using the old name to switch on the new one but the issue is still present today.

  3. An ideal solution solving the occurrence of any similar issues when placing an order through an API would be to ask the customer to select/confirm the address and/or other information via a form before confirming the order in any case where the address or other required fields supplied by the API couldn't be verified. This could be done through either a popup or a landing page similar to the PayPal order confirmation page. This could also apply to the overall checkout process and be applicable to all payment methods. The verification and redirect/popup would be triggered right after receiving the response from the payment method/API. By the same, this would allow to force a customer to provide a phone number or other information as required in cases where it wasn't provided by the API.

These issues could arise with any order placed where the address is submitted through an API. If the address in the client system isn't using the exact same region names, Magento isn't going to be able to recognize the state/province and therefore won't be able to locate the right sales tax. This is resulting in financial losts as in most cases the merchant end up liable for paying these taxes to the government. As regions, territories and state/province names are changing through time, it might be helpful to have a fallback mechanism or an also known as table assembling the previous or other commonly used names for a region ensuring that the previously created addresses are still compatible with future changes.

ghost commented 6 years ago

Hi @nikoelgatito We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. 1->Have a PayPal account with a Newfoundland address that has been created before the name of the province has changed to "Newfoundland & Labrador". 2->please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue. The GitHub issue tracker is intended for Magento Core technical issues only.