From dba2a2399f32e7c16685c9c06a3787a3fb15ba6d Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Wed, 4 Feb 2026 13:25:23 -0600 Subject: [PATCH 1/3] Add storeId and channelId for collect initialization --- .../checkout-buttons/express/godaddy.tsx | 32 +++++++++++-------- .../payment/checkout-buttons/paze/godaddy.tsx | 28 ++++++++-------- .../checkout/payment/payment-form.tsx | 20 ++++++------ .../payment-methods/credit-card/godaddy.tsx | 12 ++++--- 4 files changed, 52 insertions(+), 40 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 2db20949..2bd7d5f6 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 @@ -376,25 +376,29 @@ export function ExpressCheckoutButton() { // console.log("[poynt collect] TokenizeJsing initialized", { // couponConfig, // }); - collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId || session?.businessId, - godaddyPaymentsConfig?.appId, - { - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - requireEmail: true, - requireShippingAddress: !!session?.enableShippingAddressCollection, - supportCouponCode: !!session?.enablePromotionCodes, - ...(couponConfig ? { couponCode: couponConfig } : {}), - } - ); + collect.current = new (window as any).TokenizeJs({ + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + requireEmail: true, + requireShippingAddress: !!session?.enableShippingAddressCollection, + supportCouponCode: !!session?.enablePromotionCodes, + ...(couponConfig ? { couponCode: couponConfig } : {}), + }); } }, [ godaddyPaymentsConfig, countryCode, currencyCode, - session, + session?.businessId, + session?.storeId, + session?.channelId, + session?.enablePromotionCodes, + session?.storeName, isPoyntLoaded, isCollectLoading, calculatedAdjustments, 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 248492e5..47d13dc9 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,24 +106,26 @@ export function PazeCheckoutButton() { !hasMounted.current ) { // console.log("[poynt collect] Initializing TokenizeJs instance"); - collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId || session?.businessId, - godaddyPaymentsConfig?.appId, - { - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - requireEmail: false, - requireShippingAddress: false, - supportCouponCode: false, - } - ); + collect.current = new (window as any).TokenizeJs({ + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + requireEmail: false, + requireShippingAddress: false, + supportCouponCode: false, + }); } }, [ godaddyPaymentsConfig, countryCode, currencyCode, - session, + session?.businessId, + session?.storeId, + session?.channelId, isPoyntLoaded, isCollectLoading, ]); diff --git a/packages/react/src/components/checkout/payment/payment-form.tsx b/packages/react/src/components/checkout/payment/payment-form.tsx index 5c9e0870..b7c2eae8 100644 --- a/packages/react/src/components/checkout/payment/payment-form.tsx +++ b/packages/react/src/components/checkout/payment/payment-form.tsx @@ -155,15 +155,15 @@ export function PaymentForm( currencyCode && session?.paymentMethods?.paze?.processor === PaymentProvider.GODADDY ) { - collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId || session?.businessId, - godaddyPaymentsConfig?.appId, - { - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - } - ); + collect.current = new (window as any).TokenizeJs({ + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + }); collect.current?.supportWalletPayments().then(supports => { if (supports.paze) { @@ -180,6 +180,8 @@ export function PaymentForm( session?.paymentMethods?.paze?.processor, session?.storeName, session?.businessId, + session?.storeId, + session?.channelId, 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 0e6b71ee..e269af99 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 @@ -195,10 +195,12 @@ export function GoDaddyCreditCardForm() { ) return; - collect.current = new (window as any).TokenizeJs( - godaddyPaymentsConfig?.businessId || session?.businessId, - godaddyPaymentsConfig?.appId - ); + collect.current = new (window as any).TokenizeJs({ + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + }); collect?.current?.on('ready', () => { setCollect(collect.current); @@ -248,6 +250,8 @@ export function GoDaddyCreditCardForm() { t, setIsLoadingNonce, session?.businessId, + session?.storeId, + session?.channelId, ]); return ( From 68178d0e2001752f8f063ec2c4843eb8f793751f Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Wed, 4 Feb 2026 13:26:15 -0600 Subject: [PATCH 2/3] add changeset --- .changeset/witty-moments-cough.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/witty-moments-cough.md diff --git a/.changeset/witty-moments-cough.md b/.changeset/witty-moments-cough.md new file mode 100644 index 00000000..c1b9de97 --- /dev/null +++ b/.changeset/witty-moments-cough.md @@ -0,0 +1,5 @@ +--- +"@godaddy/react": patch +--- + +Add storeId and channelId for GDPayments Initialization From a4c9861a5c855f5a9e004a7c320aebbd74adde40 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Wed, 4 Feb 2026 13:37:23 -0600 Subject: [PATCH 3/3] fix format --- .../checkout-buttons/express/godaddy.tsx | 30 +++++++++++-------- .../payment/checkout-buttons/paze/godaddy.tsx | 28 +++++++++-------- .../checkout/payment/payment-form.tsx | 22 ++++++++------ 3 files changed, 46 insertions(+), 34 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 2bd7d5f6..498a89a9 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 @@ -376,19 +376,23 @@ export function ExpressCheckoutButton() { // console.log("[poynt collect] TokenizeJsing initialized", { // couponConfig, // }); - collect.current = new (window as any).TokenizeJs({ - businessId: godaddyPaymentsConfig?.businessId || session?.businessId, - storeId: session?.storeId, - channelId: session?.channelId, - applicationId: godaddyPaymentsConfig?.appId, - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - requireEmail: true, - requireShippingAddress: !!session?.enableShippingAddressCollection, - supportCouponCode: !!session?.enablePromotionCodes, - ...(couponConfig ? { couponCode: couponConfig } : {}), - }); + collect.current = new (window as any).TokenizeJs( + { + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + }, + { + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + requireEmail: true, + requireShippingAddress: !!session?.enableShippingAddressCollection, + supportCouponCode: !!session?.enablePromotionCodes, + ...(couponConfig ? { couponCode: couponConfig } : {}), + } + ); } }, [ godaddyPaymentsConfig, 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 47d13dc9..850a3e76 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,18 +106,22 @@ export function PazeCheckoutButton() { !hasMounted.current ) { // console.log("[poynt collect] Initializing TokenizeJs instance"); - collect.current = new (window as any).TokenizeJs({ - businessId: godaddyPaymentsConfig?.businessId || session?.businessId, - storeId: session?.storeId, - channelId: session?.channelId, - applicationId: godaddyPaymentsConfig?.appId, - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - requireEmail: false, - requireShippingAddress: false, - supportCouponCode: false, - }); + collect.current = new (window as any).TokenizeJs( + { + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + }, + { + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + requireEmail: false, + requireShippingAddress: false, + supportCouponCode: false, + } + ); } }, [ godaddyPaymentsConfig, diff --git a/packages/react/src/components/checkout/payment/payment-form.tsx b/packages/react/src/components/checkout/payment/payment-form.tsx index b7c2eae8..3155d71e 100644 --- a/packages/react/src/components/checkout/payment/payment-form.tsx +++ b/packages/react/src/components/checkout/payment/payment-form.tsx @@ -155,15 +155,19 @@ export function PaymentForm( currencyCode && session?.paymentMethods?.paze?.processor === PaymentProvider.GODADDY ) { - collect.current = new (window as any).TokenizeJs({ - businessId: godaddyPaymentsConfig?.businessId || session?.businessId, - storeId: session?.storeId, - channelId: session?.channelId, - applicationId: godaddyPaymentsConfig?.appId, - country: countryCode, - currency: currencyCode, - merchantName: session?.storeName || '', - }); + collect.current = new (window as any).TokenizeJs( + { + businessId: godaddyPaymentsConfig?.businessId || session?.businessId, + storeId: session?.storeId, + channelId: session?.channelId, + applicationId: godaddyPaymentsConfig?.appId, + }, + { + country: countryCode, + currency: currencyCode, + merchantName: session?.storeName || '', + } + ); collect.current?.supportWalletPayments().then(supports => { if (supports.paze) {