From 7c9b6837a29b943797dc6675b913cfc73544a83d Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Fri, 21 Nov 2025 08:21:30 -0600 Subject: [PATCH 1/7] update collect cdn urls --- .../checkout/payment/utils/use-poynt-collect-cdn.ts | 10 ++++++---- .../checkout/utils/use-get-env-from-context.ts | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts index 9c0781a7..9565941c 100644 --- a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts +++ b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts @@ -7,13 +7,15 @@ export const useGetPoyntCollectCdn = () => { return useMemo(() => { switch (environment) { case 'prod': - return 'https://cdn.poynt.net/collect.js'; + return 'https://collect.commerce.godaddy.com/sdk.js'; + case 'ote': + return 'https://collect.commerce.ote-godaddy.com/sdk.js'; case 'test': - return 'https://cdn.poynt.net/test/collect-test.js'; + return 'https://collect.commerce.test-godaddy.com/sdk.js'; case 'dev': - return 'https://cdn.poynt.net/ci/collect-ci.js'; + return 'https://collect.commerce.dev-godaddy.com/sdk.js'; default: - return 'https://cdn.poynt.net/collect.js'; + return 'https://collect.commerce.godaddy.com/sdk.js'; } }, [environment]); }; diff --git a/packages/react/src/components/checkout/utils/use-get-env-from-context.ts b/packages/react/src/components/checkout/utils/use-get-env-from-context.ts index 02ad3a5c..0dfc57d3 100644 --- a/packages/react/src/components/checkout/utils/use-get-env-from-context.ts +++ b/packages/react/src/components/checkout/utils/use-get-env-from-context.ts @@ -1,10 +1,13 @@ import { useGoDaddyContext } from '@/godaddy-provider.tsx'; -export type Environment = 'prod' | 'test' | 'dev'; +export type Environment = 'prod' | 'ote' | 'test' | 'dev'; export const useGetEnvFromContext = (): Environment => { const { apiHost } = useGoDaddyContext(); + if (apiHost?.includes('.ote-')) { + return 'ote'; + } if (apiHost?.includes('.test-')) { return 'test'; } From 01160aa7f8c1f0e5f65c3a36a546afa6db35745a Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Fri, 21 Nov 2025 08:25:17 -0600 Subject: [PATCH 2/7] add changeset --- .changeset/whole-horses-stare.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/whole-horses-stare.md diff --git a/.changeset/whole-horses-stare.md b/.changeset/whole-horses-stare.md new file mode 100644 index 00000000..74c9f944 --- /dev/null +++ b/.changeset/whole-horses-stare.md @@ -0,0 +1,7 @@ +--- +"@godaddy/react": patch +"@godaddy/localizations": patch +--- + +- Update collect SDK CDN urls +- Add localization keys for cart components From f624a2fdb927eed9ed9ced89c5b0454e59f28f1e Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Fri, 21 Nov 2025 08:49:32 -0600 Subject: [PATCH 3/7] use apiHost to load poynt cdn --- .../payment/utils/use-poynt-collect-cdn.ts | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts index 9565941c..41797bbe 100644 --- a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts +++ b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts @@ -1,21 +1,12 @@ import { useMemo } from 'react'; import { useGetEnvFromContext } from '@/components/checkout/utils/use-get-env-from-context.ts'; +import { useGoDaddyContext } from '@/godaddy-provider.tsx'; export const useGetPoyntCollectCdn = () => { - const environment = useGetEnvFromContext(); + const { apiHost } = useGoDaddyContext(); + const HOST = apiHost?.replace('api.', 'collect.commerce.') || ''; return useMemo(() => { - switch (environment) { - case 'prod': - return 'https://collect.commerce.godaddy.com/sdk.js'; - case 'ote': - return 'https://collect.commerce.ote-godaddy.com/sdk.js'; - case 'test': - return 'https://collect.commerce.test-godaddy.com/sdk.js'; - case 'dev': - return 'https://collect.commerce.dev-godaddy.com/sdk.js'; - default: - return 'https://collect.commerce.godaddy.com/sdk.js'; - } - }, [environment]); + return `https://${HOST}/sdk.js`; + }, [apiHost]); }; From 9d3f270cccc1a9697f51075b5a04d1e837e44b96 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Fri, 21 Nov 2025 09:14:50 -0600 Subject: [PATCH 4/7] use apiHost for all env loading --- .../checkout/payment/utils/use-load-square.ts | 6 +++--- .../payment/utils/use-poynt-collect-cdn.ts | 1 - .../checkout/utils/use-get-env-from-context.ts | 18 ------------------ 3 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 packages/react/src/components/checkout/utils/use-get-env-from-context.ts diff --git a/packages/react/src/components/checkout/payment/utils/use-load-square.ts b/packages/react/src/components/checkout/payment/utils/use-load-square.ts index 746796f5..fdd530b9 100644 --- a/packages/react/src/components/checkout/payment/utils/use-load-square.ts +++ b/packages/react/src/components/checkout/payment/utils/use-load-square.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useGetEnvFromContext } from '@/components/checkout/utils/use-get-env-from-context.ts'; +import { useGoDaddyContext } from '@/godaddy-provider.tsx'; let isSquareLoaded = false; let isSquareCDNLoaded = false; @@ -8,11 +8,11 @@ const listeners = new Set<(loaded: boolean) => void>(); export function useLoadSquare() { const { squareConfig } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); const [loaded, setLoaded] = useState(isSquareLoaded); - const environment = useGetEnvFromContext(); const squareCDN = - environment === 'prod' + apiHost && !apiHost.includes('test') && !apiHost.includes('dev') ? 'https://web.squarecdn.com/v1/square.js' : 'https://sandbox.web.squarecdn.com/v1/square.js'; diff --git a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts index 41797bbe..3f186a31 100644 --- a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts +++ b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts @@ -1,5 +1,4 @@ import { useMemo } from 'react'; -import { useGetEnvFromContext } from '@/components/checkout/utils/use-get-env-from-context.ts'; import { useGoDaddyContext } from '@/godaddy-provider.tsx'; export const useGetPoyntCollectCdn = () => { diff --git a/packages/react/src/components/checkout/utils/use-get-env-from-context.ts b/packages/react/src/components/checkout/utils/use-get-env-from-context.ts deleted file mode 100644 index 0dfc57d3..00000000 --- a/packages/react/src/components/checkout/utils/use-get-env-from-context.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { useGoDaddyContext } from '@/godaddy-provider.tsx'; - -export type Environment = 'prod' | 'ote' | 'test' | 'dev'; - -export const useGetEnvFromContext = (): Environment => { - const { apiHost } = useGoDaddyContext(); - - if (apiHost?.includes('.ote-')) { - return 'ote'; - } - if (apiHost?.includes('.test-')) { - return 'test'; - } - if (apiHost?.includes('.dev-')) { - return 'dev'; - } - return 'prod'; -}; From 2a12a31be9290f55e5e0995ec8e5d6cd2bbab6f2 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Mon, 24 Nov 2025 11:10:12 -0600 Subject: [PATCH 5/7] use businessId from session --- .../src/components/checkout/checkout.tsx | 2 +- .../checkout-buttons/express/godaddy.tsx | 2 +- .../payment/checkout-buttons/paze/godaddy.tsx | 2 +- .../checkout/payment/payment-form.tsx | 3 +- .../payment-methods/credit-card/godaddy.tsx | 4 +- .../payment/utils/conditional-providers.tsx | 5 +- .../react/src/lib/godaddy/checkout-env.ts | 802 ++---------------- .../src/lib/godaddy/checkout-mutations.ts | 1 + 8 files changed, 70 insertions(+), 751 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 8fbd1937..bbe460d2 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -65,7 +65,7 @@ export type StripeConfig = { }; export type GodaddyPaymentsConfig = { - businessId: string; + businessId?: string; appId: string; }; diff --git a/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx b/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx index ea5c8090..92bff855 100644 --- a/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx @@ -367,7 +367,7 @@ export function ExpressCheckoutButton() { // couponConfig, // }); collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId, + session?.businessId || godaddyPaymentsConfig?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, diff --git a/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx b/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx index 5e2f06ff..c87d30f3 100644 --- a/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx @@ -106,7 +106,7 @@ export function PazeCheckoutButton() { ) { // console.log("[poynt collect] Initializing TokenizeJs instance"); collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId, + session?.businessId || godaddyPaymentsConfig?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, diff --git a/packages/react/src/components/checkout/payment/payment-form.tsx b/packages/react/src/components/checkout/payment/payment-form.tsx index c1d7d0e8..eb4e03a3 100644 --- a/packages/react/src/components/checkout/payment/payment-form.tsx +++ b/packages/react/src/components/checkout/payment/payment-form.tsx @@ -155,7 +155,7 @@ export function PaymentForm( session?.paymentMethods?.paze?.processor === PaymentProvider.GODADDY ) { collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId, + session?.businessId || godaddyPaymentsConfig?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, @@ -178,6 +178,7 @@ export function PaymentForm( currencyCode, session?.paymentMethods?.paze?.processor, session?.storeName, + session?.businessId, isPoyntLoaded, ]); diff --git a/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx b/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx index 30e7022c..55ddec00 100644 --- a/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx @@ -16,6 +16,7 @@ import { PaymentMethodType } from '@/types'; export function GoDaddyCreditCardForm() { const { t } = useGoDaddyContext(); + const { session } = useCheckoutContext(); const { setCollect, setIsLoadingNonce } = usePoyntCollect(); const { isPoyntLoaded } = useLoadPoyntCollect(); const { godaddyPaymentsConfig, setCheckoutErrors } = useCheckoutContext(); @@ -189,7 +190,7 @@ export function GoDaddyCreditCardForm() { if (!isPoyntLoaded || !godaddyPaymentsConfig || collect.current) return; collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId, + session?.businessId || godaddyPaymentsConfig?.businessId, godaddyPaymentsConfig?.appId ); @@ -240,6 +241,7 @@ export function GoDaddyCreditCardForm() { setCheckoutErrors, t, setIsLoadingNonce, + session?.businessId, ]); return ( diff --git a/packages/react/src/components/checkout/payment/utils/conditional-providers.tsx b/packages/react/src/components/checkout/payment/utils/conditional-providers.tsx index 6ed59f55..8194087b 100644 --- a/packages/react/src/components/checkout/payment/utils/conditional-providers.tsx +++ b/packages/react/src/components/checkout/payment/utils/conditional-providers.tsx @@ -26,10 +26,7 @@ export function ConditionalPaymentProviders({ } // Only wrap with PoyntCollectProvider (GoDaddy Payments) if configured - if ( - godaddyPaymentsConfig?.businessId?.trim() && - godaddyPaymentsConfig?.appId?.trim() - ) { + if (godaddyPaymentsConfig?.appId?.trim()) { wrappedChildren = ( {wrappedChildren} ); diff --git a/packages/react/src/lib/godaddy/checkout-env.ts b/packages/react/src/lib/godaddy/checkout-env.ts index 68ce5ae7..75f0599b 100644 --- a/packages/react/src/lib/godaddy/checkout-env.ts +++ b/packages/react/src/lib/godaddy/checkout-env.ts @@ -1015,730 +1015,6 @@ const introspection = { ], interfaces: [], }, - { - kind: 'OBJECT', - name: 'Catalog', - fields: [ - { - name: 'sku', - type: { - kind: 'OBJECT', - name: 'CatalogSku', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'skuGroup', - type: { - kind: 'OBJECT', - name: 'CatalogSkuGroup', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'skuGroups', - type: { - kind: 'OBJECT', - name: 'CatalogSkuGroupConnection', - }, - args: [ - { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - { - name: 'ids', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'skus', - type: { - kind: 'OBJECT', - name: 'CatalogSkuConnection', - }, - args: [ - { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - { - name: 'ids', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - }, - }, - ], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogAttribute', - fields: [ - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'values', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CatalogAttributeValue', - }, - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogAttributeValue', - fields: [ - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogMedia', - fields: [ - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogPrice', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogPriceRange', - fields: [ - { - name: 'max', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, - }, - { - name: 'min', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSKUMediaObjectsConnection', - fields: [ - { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CatalogSKUMediaObjectsConnectionEdge', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'pageInfo', - type: { - kind: 'OBJECT', - name: 'SKUMediaObjectsPageInfo', - }, - args: [], - isDeprecated: false, - }, - { - name: 'totalCount', - type: { - kind: 'SCALAR', - name: 'Int', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSKUMediaObjectsConnectionEdge', - fields: [ - { - name: 'cursor', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'node', - type: { - kind: 'OBJECT', - name: 'CatalogMedia', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSku', - fields: [ - { - name: 'attributes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CatalogAttribute', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'mediaObjects', - type: { - kind: 'OBJECT', - name: 'CatalogSKUMediaObjectsConnection', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'prices', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CatalogPrice', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSkuConnection', - fields: [ - { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'CatalogSkuEdge', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSkuEdge', - fields: [ - { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'node', - type: { - kind: 'OBJECT', - name: 'CatalogSku', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSkuGroup', - fields: [ - { - name: 'compareAtPriceRange', - type: { - kind: 'OBJECT', - name: 'CatalogPriceRange', - }, - args: [], - isDeprecated: false, - }, - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'mediaObjects', - type: { - kind: 'OBJECT', - name: 'CatalogSKUMediaObjectsConnection', - }, - args: [ - { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'before', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - { - name: 'last', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - ], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'priceRange', - type: { - kind: 'OBJECT', - name: 'CatalogPriceRange', - }, - args: [], - isDeprecated: false, - }, - { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSkuGroupConnection', - fields: [ - { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'CatalogSkuGroupEdge', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CatalogSkuGroupEdge', - fields: [ - { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'node', - type: { - kind: 'OBJECT', - name: 'CatalogSkuGroup', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, { kind: 'OBJECT', name: 'CheckoutAuthToken', @@ -1833,6 +1109,15 @@ const introspection = { args: [], isDeprecated: false, }, + { + name: 'businessId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { name: 'channelId', type: { @@ -1866,6 +1151,15 @@ const introspection = { args: [], isDeprecated: false, }, + { + name: 'defaultChannelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { name: 'defaultOperatingHours', type: { @@ -8853,15 +8147,6 @@ const introspection = { kind: 'OBJECT', name: 'Query', fields: [ - { - name: 'catalog', - type: { - kind: 'OBJECT', - name: 'Catalog', - }, - args: [], - isDeprecated: false, - }, { name: 'checkoutSession', type: { @@ -9030,6 +8315,24 @@ const introspection = { args: [], isDeprecated: false, }, + { + name: 'mediaObjects', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUMediaObject', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, { name: 'metafields', type: { @@ -9261,37 +8564,40 @@ const introspection = { }, { kind: 'OBJECT', - name: 'SKUMediaObjectsPageInfo', + name: 'SKUMediaObject', fields: [ { - name: 'endCursor', + name: 'id', type: { - kind: 'SCALAR', - name: 'String', + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, }, args: [], isDeprecated: false, }, { - name: 'hasNextPage', + name: 'label', type: { kind: 'SCALAR', - name: 'Boolean', + name: 'String', }, args: [], isDeprecated: false, }, { - name: 'hasPreviousPage', + name: 'name', type: { kind: 'SCALAR', - name: 'Boolean', + name: 'String', }, args: [], isDeprecated: false, }, { - name: 'startCursor', + name: 'type', type: { kind: 'SCALAR', name: 'String', @@ -9299,6 +8605,18 @@ const introspection = { args: [], isDeprecated: false, }, + { + name: 'url', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, ], interfaces: [], }, diff --git a/packages/react/src/lib/godaddy/checkout-mutations.ts b/packages/react/src/lib/godaddy/checkout-mutations.ts index d493425c..92577dba 100644 --- a/packages/react/src/lib/godaddy/checkout-mutations.ts +++ b/packages/react/src/lib/godaddy/checkout-mutations.ts @@ -10,6 +10,7 @@ export const CreateCheckoutSessionMutation = graphql(` returnUrl successUrl storeId + businessId channelId customerId storeName From 4b3322a1defd2d93cf40e6c0e4054314eb6e2600 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Mon, 24 Nov 2025 11:26:13 -0600 Subject: [PATCH 6/7] update changeset --- .changeset/whole-horses-stare.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/whole-horses-stare.md b/.changeset/whole-horses-stare.md index 74c9f944..7b41d7bc 100644 --- a/.changeset/whole-horses-stare.md +++ b/.changeset/whole-horses-stare.md @@ -5,3 +5,4 @@ - Update collect SDK CDN urls - Add localization keys for cart components +- Optional businessId for GDP config (will pull from store data if not provided) From 7d3f8a1cff492e6267e43e908662a728ef0e51c6 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Mon, 24 Nov 2025 11:27:54 -0600 Subject: [PATCH 7/7] prioritize config businessId --- .../checkout/payment/checkout-buttons/express/godaddy.tsx | 2 +- .../checkout/payment/checkout-buttons/paze/godaddy.tsx | 2 +- packages/react/src/components/checkout/payment/payment-form.tsx | 2 +- .../checkout/payment/payment-methods/credit-card/godaddy.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx b/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx index 92bff855..d15a0de6 100644 --- a/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/checkout-buttons/express/godaddy.tsx @@ -367,7 +367,7 @@ export function ExpressCheckoutButton() { // couponConfig, // }); collect.current = new (window as any).TokenizeJs( - session?.businessId || godaddyPaymentsConfig?.businessId, + godaddyPaymentsConfig?.businessId || session?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, diff --git a/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx b/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx index c87d30f3..79e3a865 100644 --- a/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/checkout-buttons/paze/godaddy.tsx @@ -106,7 +106,7 @@ export function PazeCheckoutButton() { ) { // console.log("[poynt collect] Initializing TokenizeJs instance"); collect.current = new (window as any).TokenizeJs( - session?.businessId || godaddyPaymentsConfig?.businessId, + godaddyPaymentsConfig?.businessId || session?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, diff --git a/packages/react/src/components/checkout/payment/payment-form.tsx b/packages/react/src/components/checkout/payment/payment-form.tsx index eb4e03a3..6f0408ed 100644 --- a/packages/react/src/components/checkout/payment/payment-form.tsx +++ b/packages/react/src/components/checkout/payment/payment-form.tsx @@ -155,7 +155,7 @@ export function PaymentForm( session?.paymentMethods?.paze?.processor === PaymentProvider.GODADDY ) { collect.current = new (window as any).TokenizeJs( - session?.businessId || godaddyPaymentsConfig?.businessId, + godaddyPaymentsConfig?.businessId || session?.businessId, godaddyPaymentsConfig?.appId, { country: countryCode, diff --git a/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx b/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx index 55ddec00..5b824889 100644 --- a/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx +++ b/packages/react/src/components/checkout/payment/payment-methods/credit-card/godaddy.tsx @@ -190,7 +190,7 @@ export function GoDaddyCreditCardForm() { if (!isPoyntLoaded || !godaddyPaymentsConfig || collect.current) return; collect.current = new (window as any).TokenizeJs( - session?.businessId || godaddyPaymentsConfig?.businessId, + godaddyPaymentsConfig?.businessId || session?.businessId, godaddyPaymentsConfig?.appId );