• Resolved birken

    (@birken)


    hello,

    So i use WooCommerce and stripe with my booking system everything work fine in PayPal and other payment gateways… But with stripe i keep having problem with the Country Code at the Checkout. so sometimes when customer add wrong country code it messes up my order bookings in my system… this is the error at stripe..

    invalid_request_error – billing_details[address][country]

    Country ‘AUS ‘ is unknown. Try using a 2-character alphanumeric country code instead, such as ‘US’, ‘EG’, or ‘GB’.

    So my question: in the CART how can make it so customer are not able to add wrong country codes?

    only these codes are ok with stripe: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @birken,

    WooCommerce, by default, uses the?ISO 3166?standard. So, if a customer selects Australia, the Alpha-2 country code “AU” should pass to Stripe instead of the Alpha-3 code “AUS”: https://www.iso.org/obp/ui/#iso:code:3166:AU

    However, for better assistance, are you using standard checkout or customized using a third-party plugin? Also, what booking plugin are you using? Can you share a copy of the following:

    • System Status Report: Navigate to WooCommerce → Status. Select Get System Report and then Download for Support.
    • Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.

    You could copy and paste your reply or share it via Mozilla Community Pastebin and send the link here.

    In the meantime, you can run a conflict test to help you identify the cause of the issue. More info: https://woo.com/document/how-to-test-for-conflicts/

    Let us know how that goes for you.

    Thread Starter birken

    (@birken)

    hello,

    no reason to see any logs as the error shows clearly in stripe see here
    https://ibb.co/w45jrJG
    https://ibb.co/0nCJXFS

    what happen is the user add Australia or something else and not the alpha code and sometimes it creates a booking on my side and the booking has missing invoices eg… but that is problem on my side.

    how can i solve that users can write there own country as country code as Stripe dont accept that… or is any other solution so user only can add alpha code but not everybody knows it. so is abit weird one this no other gateways happen this for.

    any ideas?

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @birken,

    how can i solve that users can write there own country as country code as Stripe dont accept that… or is any other solution so user only can add alpha code but not everybody knows it. so is abit weird one this no other gateways happen this for.

    It sounds like you might be overriding the standard checkout behavior of WooCommerce. Normally, WooCommerce’s standard checkout includes a country selection field where users can choose their country. It means the user doesn’t need to manually input the ISO 3166-1 alpha-2 codes, as WooCommerce will define them automatically based on the selected country.

    For better assistance, we need to understand your setup and situation clearly. Could you please share more information about your issue, including the information requested earlier?

    Looking forward to resolving this issue for you.

    Thread Starter birken

    (@birken)

    hello :), i am using Flexible Checkout Fields plugin by WP desk as i need some extra information from customer. maybe that is the problem?

    it seem my default WooCommerce checkout don’t show filed for customers address, post code and country.. where do enable that?

    Warm regards

    Hi @birken!

    Thank you for reaching out back.

    i am using Flexible Checkout Fields plugin by WP desk as i need some extra information from customer. maybe that is the problem?

    It could be. Sometimes, an outdated or malfunctioning code could be interfering. To be sure of this, you could try performing a conflict test as recommended by @shameemreza earlier.

    To do it, temporarily switch your theme back to Storefront, disabling all plugins except WooCommerce and Stripe, and then check again if the issue persists.

    If that solves it, reactivate the theme first and check again. Then, reactivate your other plugins, testing each until you find the one causing conflict.

    If you cannot perform a conflict test on your live site, we recommend creating a staging site using the WP Staging plugin.

    You can find a more detailed explanation of how to do a conflict test here: https://woo.com/document/how-to-test-for-conflicts/

    it seem my default WooCommerce checkout don’t show filed for customers address, post code and country.. where do enable that?

    By default, at checkout, WooCommerce shows fields like address, country, region, and postal code in the Shipping Address section. The image below shows how these fields display on my test site using the Storefront theme.

    Image link: https://i.ibb.co/CPwwb5N/bjafjn.png

    If you can’t see these fields displaying in the Shipping Address section of your checkout page, it could be something related to your theme not displaying it or a conflict with another plugin. Please try changing your theme to Storefront or performing a conflict test to see if it helps to solve the issue.

    Let us know how it goes!

    Thread Starter birken

    (@birken)

    thx guys,

    it was my theme that have overriding code. now also the plugin checkout field working fine.

    happy days ??

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @birken,

    Glad to hear it – thanks for letting us know!

    I’ll mark this thread as resolved now.

    If you have any further questions, I recommend creating a new thread.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘error country code!’ is closed to new replies.