Hi everyone,
I’m facing some issue about integrating “credit card payments extension with UI extensibility”
here are my related configurations;
ui_extension → shopify.extension.toml
[[extensions]]
name = “card-ui”
handle = “card-ui”
type = “ui_extension”
[[extensions.targeting]]
module = “./src/Checkout.tsx”
target = “purchase.checkout.payment-option-item.hosted-fields.render-after”
export = “default”
.
.
.
payments_extension → shopify.extension.toml
api_version = “2025-01”
[[extensions]]
name = “Credit Card Payment”
handle = “credit-card-onsite”
type = “payments_extension”
.
.
ui_extension_handle = “card-ui”
[[extensions.checkout_payment_method_fields]]
key = “number”
type = “string”
required = true
[[extensions.checkout_payment_method_fields]]
key = “email”
type = “string”
required = true
When i run shopify app dev previewed card ui website crashes with;
TypeError: Cannot read properties of undefined (reading ‘includes’)
at app.BeOm4IS4.js:42:26948
at Array.reduce ()
at yIe (app.BeOm4IS4.js:42:26932)
at Rs._k [as constructor] (app.BeOm4IS4.js:69:318209)
at Rs.pU [as render] (app.BeOm4IS4.js:2:9369)
at cS (app.BeOm4IS4.js:2:6509)
at fN (app.BeOm4IS4.js:2:1962)
at uU (app.BeOm4IS4.js:2:8483)
at cS (app.BeOm4IS4.js:2:7124)
at fN (app.BeOm4IS4.js:2:1962)
Findings: It does crash before rendering the Extension component in Checkout.tsx exported default like;
export default reactExtension(“purchase.checkout.payment-option-item.hosted-fields.render-after”, () => )
Any idea why does it crash?