• Resolved vlasin

    (@vlasin)


    Hi there,

    I am using your plugin successfully for quite some time but recently I came across a weird problem where if I create an order with different billing and shipping details and I run into the error

    Not matching fields: [shipping_address.given_name, shipping_address.family_name]

    So if I use a different shipping given name and shipping family name from billing given name and billing family name , I cannot complete and order no matter the Klarna payment method I chose. I have checked the Klarna logs and data seems to be transferred correctly.

    Do you have any insights ? Looking forward to your answer. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kristi at Klarna

    (@klarna)

    Hi @vlasin,

    Please check that your shop’s Woo checkout form has two separate fields for name (first name & last name), as standard in Woo checkout where name is split across 2 fields, which can be viewed at: https://demo.krokedil.se/klarnapayments/

    as the Woo KP plugin expects name to be in 2 fields

    Thread Starter vlasin

    (@vlasin)

    Hi @klarna,

    Thanks for your answer!
    I checked your referenced website ( https://demo.krokedil.se/klarnapayments/ ) and I see there is no shipping details requested at the last step of checkout. So this website will not run into my scenario where I use both billing and shipping fields.
    My checkout form uses two separate fields for each section billing and shipping forms. So it has the following fields:
    billling given_name ( mandatory )
    billing family_name ( mandatory )
    shipping given_name ( optional )
    shipping family_name ( optional )

    In case I submit the checkout form were shipping given_name value is different from billing given_name I run into the issue where Klarna API returns a message like:

    Not matching fields: [shipping_address.given_name]

    Might not be the plugin at fault but neither Klarna docs offer any insights in their documentation why I cannot use a different shipping given_name from billing given_name.
    One common scenario is when I want to have a a billing invoice for me and ship bought product to a friend. I need to be able to use different given_names for billing and shipping.
    There is no problem with other shipping fields being different from billing fields like postcode , city , country but only for given_name and family_name .
    This is so weird and I would really appreciate any feedback from your side.
    Thanks!

    Plugin Author Kristi at Klarna

    (@klarna)

    thank you for the additional info @vlasin!

    Woo KP plugin expertise is needed, so hoping Krokedil can best help next for this.

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    You mention that you have two separate fields for each section billing and shipping forms and these does not seem to be the standard default WooCommerce fields. When using an embedded checkout you need to have all the standard checkout fields in the WooCommerce checkout available for the checkout to be working correctly. We have a documentation for this here.

    Plugin Author Kristi at Klarna

    (@klarna)

    Closing, as hopefully resolved per the last comment, but if further support is needed, please let us know.

    rasamax

    (@rasamax)

    Yes, “louisekrokedil” given link to documentation explained how to fix it. Don’t use “unset(…)” on original fields in “woocommerce_checkout_fields”, “woocommerce_shipping_fields” or “woocommerce_billing_fields” filters. Just make their [‘class’] contain “d-none” or other visually hidding class in case if you still need to show them directly in non-Klarna case.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.