Invalid state/provice value being sent to PayPal for International customers

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 年 前
We are a company located in the United States.  Yesterday we had a report from a customer in Spain saying that they were not able to complete a purchase on our site because they were getting an error from PayPal.  Our nopCommerce implementation uses PayPal Payment Pro and we have been using that successfully for a couple of years now.

After talking to PayPal and asking their support people to look into this for us, they were able to tell me that this customer in Spain had tried the purchase two times with different cards and both transactions were rejected by PayPal because the billing address "state/province" data being transferred to PayPal was incorrect.

On one transaction, a state/province value of "CA" was being sent to PayPal, on the other transaction, the state/province value of "ESP" was being sent to PayPal.

The reason I think this may be a nopCommerce issue is because when a person selects "Spain" as their billing country, the only value displayed in the state/province drop down list is "Other (non US)".  The customer cannot override that value so I am not sure how the transaction being sent to PayPal could contain the values "CA" or "ESP" for the state/province field.

We are running nopCommerce v2.6

Can anyone help me understand how a "state/province" value that is not in the allowed drop down list, is getting sent to PayPal?

We have reason to believe that this may also be happening to other international customers.

Thanks,
Gary
11 年 前
If customer doesn't choose a state (when "Other (non US)" is displayed), then "CA" is sent to PayPal (see \Plugins\Nop.Plugin.Payments.PayPalDirect\PayPalDirectPaymentProcessor.cs file, line 161). It's done because State is a required field in PayPal.

Just go to admin area > a country detail page > "states" tab and add all available states (google for them). This way a customer will always choose some state
11 年 前
How do we prevent PayPal from rejecting the transaction when the "CA" state is used since CA is not a valid state for the country of Spain?
11 年 前
Are you saying that we have to manually populate the state field for all countries?
11 年 前
SwimmingWorld wrote:
How do we prevent PayPal from rejecting the transaction when the "CA" state is used since CA is not a valid state for the country of Spain?

You should address this question to PayPal

SwimmingWorld wrote:
Are you saying that we have to manually populate the state field for all countries?

Right

P.S. Perhaps, this work item (inks and attached files) will be helpful for you
11 年 前
Is there a way to have the state/province field be a text box instead of a drop down list so that customers can manually enter their state for international orders?
11 年 前
No out of the box
11 年 前
Looking back at our order history, we received several orders from Spain in 2013.  If the only state selection available has been "Other (non US)" and these orders went through last year with the "Other (non US)" selection, does this indicate that PayPal may have changed their validation requirements to now check for a valid "state" on billing addresses from foreign countries?
11 年 前
Maybe. The plugin source code wasn't changed
11 年 前
OK, thanks for your quick replies to my questions.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.