Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/witty-moments-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@godaddy/react": patch
---

Add storeId and channelId for GDPayments Initialization
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,12 @@ export function ExpressCheckoutButton() {
// couponConfig,
// });
collect.current = new (window as any).TokenizeJs(
godaddyPaymentsConfig?.businessId || session?.businessId,
godaddyPaymentsConfig?.appId,
{
businessId: godaddyPaymentsConfig?.businessId || session?.businessId,
storeId: session?.storeId,
channelId: session?.channelId,
applicationId: godaddyPaymentsConfig?.appId,
},
{
country: countryCode,
currency: currencyCode,
Expand All @@ -394,7 +398,11 @@ export function ExpressCheckoutButton() {
godaddyPaymentsConfig,
countryCode,
currencyCode,
session,
session?.businessId,
session?.storeId,
session?.channelId,
session?.enablePromotionCodes,
session?.storeName,
isPoyntLoaded,
isCollectLoading,
calculatedAdjustments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ export function PazeCheckoutButton() {
) {
// console.log("[poynt collect] Initializing TokenizeJs instance");
collect.current = new (window as any).TokenizeJs(
godaddyPaymentsConfig?.businessId || session?.businessId,
godaddyPaymentsConfig?.appId,
{
businessId: godaddyPaymentsConfig?.businessId || session?.businessId,
storeId: session?.storeId,
channelId: session?.channelId,
applicationId: godaddyPaymentsConfig?.appId,
},
{
country: countryCode,
currency: currencyCode,
Expand All @@ -123,7 +127,9 @@ export function PazeCheckoutButton() {
godaddyPaymentsConfig,
countryCode,
currencyCode,
session,
session?.businessId,
session?.storeId,
session?.channelId,
isPoyntLoaded,
isCollectLoading,
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,12 @@ export function PaymentForm(
session?.paymentMethods?.paze?.processor === PaymentProvider.GODADDY
) {
collect.current = new (window as any).TokenizeJs(
godaddyPaymentsConfig?.businessId || session?.businessId,
godaddyPaymentsConfig?.appId,
{
businessId: godaddyPaymentsConfig?.businessId || session?.businessId,
storeId: session?.storeId,
channelId: session?.channelId,
applicationId: godaddyPaymentsConfig?.appId,
},
{
country: countryCode,
currency: currencyCode,
Expand All @@ -180,6 +184,8 @@ export function PaymentForm(
session?.paymentMethods?.paze?.processor,
session?.storeName,
session?.businessId,
session?.storeId,
session?.channelId,
isPoyntLoaded,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -248,6 +250,8 @@ export function GoDaddyCreditCardForm() {
t,
setIsLoadingNonce,
session?.businessId,
session?.storeId,
session?.channelId,
]);

return (
Expand Down