woocommerce / woocommerce-gateway-paypal-express-checkout

59 stars 64 forks source link

Unable to checkout: Billing State / County is a required field. #722

Open amyos22 opened 4 years ago

amyos22 commented 4 years ago

After customers pay with Paypal, they are directed back to the site to confirm their order but get the following errors:

Billing State / County is a required field. Billing Phone is a required field. Billing Postcode / ZIP is not valid. You can look up the correct Eircode here.

They cannot change their address once they are back on the Wordpress site. This was not an issue 2 days ago.

I would like to stop the required field error.

BluehostDeactivate .Version 1.5.2 | By Mike Hansen Google Analytics for WordPress by MonsterInsightsSettings Version 7.10.4 Jetpack by WordPress.comusers 8.4.2 MC4WP: Mailchimp .Version 4.7.6 Simple Image Sizes Version 3.2.1 UpdraftPlus .Version 1.16.23 WooCommerce Stripe Gateway Version 4.3.3 WPForms Lite Thanks

LCmry commented 4 years ago

Hi @amyos22, thanks for the report. Can you list the steps taken to reproduce this issue, including whether the product is virtual or physical?

amyos22 commented 4 years ago

Hi LCmry, thanks for responding! We have physical products. For the steps taken to reproduce the issue:

  1. Go to checkout
  2. Be redirected to PayPal for payment
  3. Log into paypal, pay
  4. Redirected back to website to confirm the paypal order.
mattallan commented 4 years ago

Hi @amyos22 we've managed to replicate a similar issue to yours by setting the Country to Cyprus but we're only seeing the one error:

Billing State / County is a required field.

You mentioned you're seeing 3 errors:

Billing State / County is a required field.
Billing Phone is a required field.
Billing Postcode / ZIP is not valid. You can look up the correct Eircode here.

To make sure we squash all the issues, do you mind sharing with us what billing country and possible state/zipcode you're entering at PayPal?

I suspect what is happening here is PayPal is not sending this information back to Woo, or is not mapping correctly so one possible fix we're looking into is asking the customer to manually enter any missing required fields when they return from PayPal.


Here's how I have reproduced part of this issue:

  1. Visit a single product page (physical product)
  2. Click on the PayPal Buy Now button
  3. While at PayPal, set the country to Cyprus
  4. Fill in the rest of the billing info
  5. Once returned from PayPal, on the Confirm your PayPal order, click place the order.
  6. See "Billing State / County is a required field." error
james-allan commented 4 years ago

I've been able to replicate the errors mentioned by @amyos22 if I:

  1. Change my PayPal Checkout settings to require a phone number (https://cloudup.com/cD4KPicgFKr) and
  2. Don't enter a valid Ireland zip/post code.

When I return to the store and attempt to complete the order I get the following errors:

Screen Shot 2020-05-07 at 2 31 04 pm

If I switch to the state_field_not_required branch:

So I think we can say that the PR #725 fixes the county error. The invalid Eircode and phone number errors are caused by the phone number being required and the customer not entering it when they return to the store and an invalid post code entered for Ireland while at PayPal.

mattallan commented 4 years ago

Ooh, Thanks @james-allan! I'm not 100% sure how we should handle these situations where PayPal is fine with invalid zip codes being entered for certain countries

Since PayPal is allowing invalid zip codes, should we do something similar to what we see in #725 and make the zipcode field optional like state fields? Or should we manually add/load separate checkout fields on this page for these missing fields and then make sure we're recalculating shipping methods/prices when these fields update?

🤔 not sure how much complexity that adds. What would be your take on this?

james-allan commented 4 years ago

Yeah, it's tough. I went looking in WC's repro yesterday to see what the required format is and it's something like A12 Y123.

While I was looking into that I stumbled across https://github.com/woocommerce/woocommerce/issues/10663. Essentially, WC introduced postcodes for Ireland in 2016 and made them required when they weren't. They were only recently introduced and so people and shipping services weren't been requiring them. I don't know if that's still the case, however, I just checked with PayPal, and they don't make it required.

If PayPal don't make it required, I guess we'll need to make it not required as well. I tried to do some research to see if they are required by postal services but couldn't find anything definitive.

james-allan commented 4 years ago

Ok so I just found this FAQ on it https://www.eircode.ie/faqs/. There it says:

An organisation is insisting on an Eircode – I thought using Eircode was not mandatory?

No government department is making Eircode mandatory, although they may ask you for an Eircode, you are not obligated to provide it. For private organisations, it is up to each organisation to determine how they want to use Eircode – we have no say over how they conduct business. Many overseas companies already insist on using a postcode when ordering online as they have already seen the benefits/efficiencies of using a postcode.

From other things I've read, it's not really a postcode like ours here in Australia and how I think they work in the US. In Ireland the eircode is unique to your house, it's basically a codified address.

Eircode is a much more advanced postcode system, with a unique Eircode for every home and business address which will help everyone find addresses easier.

With that in mind, I think we can make the postcode optional for Ireland based addresses. I don't know yet how broad these type of issues are for other countries though.

Toshiwoz commented 4 years ago

I'm experiencing the same issues, I sell to Ecuador.

A quick and dirty workaround is to install a plugin that edits the required fields to not mandatory. The plugin is "Checkout Field Editor for WooCommerce".

james-allan commented 4 years ago

Hi @Toshiwoz.

From my understanding and testing, PayPal doesn't require a postcode for Ecuadorian addresses so we will need to apply the changes I mentioned above to Ecuador too.

Doing some research, I found that some postal services require a postcode for mail sent to Ecuador, while another (albeit older) website mention they aren't required.

Given PayPal doesn't make it required, I think we'll need to follow that example.

Toshiwoz commented 4 years ago

Hi @Toshiwoz.

From my understanding and testing, PayPal doesn't require a postcode for Ecuadorian addresses so we will need to apply the changes I mentioned above to Ecuador too.

Doing some research, I found that some postal services require a postcode for mail sent to Ecuador, while another (albeit older) website mention they aren't required.

Postal code is relatively new here, my area got one like 5 years ago or so. So my guess is that many do not even know their own.

Anyhow, in my particular case I got problems with the state being mandatory in Woocommerce while on PayPal is not, thus having the purchase nont completed due to that.

gavindelaney commented 3 years ago

we are still facing this issue,

we have a few users facing this issue, not everyone but some,

when they try to put through an order with paypal express they get this error message ‘Billing County not valid’

for example I put through a test order on our test site to test this out,

using the address which copied straight from paypal portal, Unit W4D Toughers Business Park Naas Leinster W91 HH2C

then when go to checkout I get this error, ‘Billing County is not valid. Please enter one of the following: Carlow, Cavan, Clare, Cork, Donegal, Dublin, Galway, Kerry, Kildare, Kilkenny, Laois, Leitrim, Limerick, Longford, Louth, Mayo, Meath, Monaghan, Offaly, Roscommon, Sligo, Tipperary, Waterford, Westmeath, Wexford, Wicklow’

I then cannot change the billing county at the checkout,

I’m guessing this is due to not having one of those counties in my address, and Leinster may be in there instead,

but this is just what was transferred from paypal, so is there a way to stop throwing up that error message? and let the order through,

or is there anyway to fix this issue as it is confusing our customers if they get this far,

amyos22 commented 3 years ago

Hi,

The way I fixed this was to change my website template to the WooCommerce Storefront template.

Thanks

On Thu 5 Nov 2020, 09:59 gavindelaney, notifications@github.com wrote:

I have been onto you previously but we are still facing this issue,

we have a few users facing this issue, not everyone but some,

when they try to put through an order with paypal express they get this error message ‘Billing County not valid’

for example I put through a test order on our test site to test this out,

using the address which copied straight from paypal portal, Unit W4D Toughers Business Park Naas Leinster W91 HH2C

then when go to checkout I get this error, ‘Billing County is not valid. Please enter one of the following: Carlow, Cavan, Clare, Cork, Donegal, Dublin, Galway, Kerry, Kildare, Kilkenny, Laois, Leitrim, Limerick, Longford, Louth, Mayo, Meath, Monaghan, Offaly, Roscommon, Sligo, Tipperary, Waterford, Westmeath, Wexford, Wicklow’

I then cannot change the billing county at the checkout,

I’m guessing this is due to not having one of those counties in my address, and Leinster may be in there instead,

but this is just what was transferred from paypal, so is there a way to stop throwing up that error message? and let the order through,

or is there anyway to fix this issue as it is confusing our customers if they get this far,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/722#issuecomment-722272547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI7MOJ7FJ7LONK6APXGSS3SOJZPXANCNFSM4MSDKN7Q .

gavindelaney commented 3 years ago

@amyos22 Hi,

thanks for the reply,

this makes sense but I can't do that or our whole website will change,

any ideas how to stop it from happening?

amyos22 commented 3 years ago

Unfortunately not - we had to change our website because our template wasn't compatible with the plug in. Sorry to not be more helpful

On Thu 5 Nov 2020, 10:08 gavindelaney, notifications@github.com wrote:

@amyos22 https://github.com/amyos22 Hi,

thanks for the reply,

this makes sense but I can't do that or our whole website will change,

any ideas how to stop it from happening?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/722#issuecomment-722277416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI7MOMUV5TMP2Y5FN3N4BTSOJ2QRANCNFSM4MSDKN7Q .

gavindelaney commented 3 years ago

Hi,

we need a solution to this,

we can't change our whole website to fix this and we shouldn't have to,

is there any solution we can add to fix this?

advantagepoint commented 3 years ago

Hi, I've came across the same issue but not related to theme conflict or plugin conflict as it still occurs with the theme being shopfront and all other plugins deactivated. I was told by woocommerce support that it was fixed in the latest version of paypal checkout but I have the latest version (2.1.1) and still get the same error as above. Any recent developments on this?

donmarkon commented 3 years ago

When i want to place an order with my own PP account I get this error viber_image_2021-07-08_13-15-54-776

Also had a customer and with hot jar i saw this

chrome_a32SYlNypX