Closed kaushikasomaiya closed 1 year ago
Hello @kaushikasomaiya 👋
Thanks for reaching out! According to https://github.com/woocommerce/woocommerce/issues/42577 and https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-4, the Authorize.Net payment gateway does not provide support for WooCommerce Blocks yet.
Can this be called a conflict on Authorize.Net's side?
As it's up to the payment service provider to make the extension compatible with WooCommerce Blocks, I'd say the conflict is on their end. We have some documentation for Third-party developers and some Developer Resources available to help with their integration efforts.
I'll close this issue for now, but I suggest keeping an eye on https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-4 where we list payment extensions that are compatible with WooCommerce Blocks.
Hey @nielslange Thanks for the feedback. :)
That makes sense.
I am wondering if this issue will arise irrespective of the compatibility with checkout block.
For example, if any plugin (not necessarily a payment gateway) sets the State value to null - this will skip the checkout blocks line below and pass an array to html_entity_decode() https://github.com/woocommerce/woocommerce-blocks/blob/f4ab91e00c307c798c05870ed427cc53b9e6818e/src/BlockTypes/Checkout.php#L368
Ref: https://github.com/woocommerce/woocommerce-blocks/pull/6896
Or is it that the state value should not* be set null by plugins? (for countries not having any states like AF).
CC: @nielslange @senadir as one more case here: 6024606-zen. Just wanted to get feedback on my theory in comment above. :)
Thank you @kaushikasomaiya I agree that we should be more defensive regardless of plugin compatibility. I'm trying to remember if null is a valid value or not, I know that ""
is a valid value.
5977707-zen
Authorize.Net gateway seems to be setting null value on states for countries that don't have states:
This is to remove blank states from some countries such as AF.
This is conflicting with Checkout Blocks and causing a fatal error:
The line here seems to be skipped due to null state value:
https://github.com/woocommerce/woocommerce-blocks/blob/f4ab91e00c307c798c05870ed427cc53b9e6818e/src/BlockTypes/Checkout.php#L368
Can this be called a conflict on Authorize.Net's side? or on WooCommerce Blocks?