File tree Expand file tree Collapse file tree 5 files changed +41
-12
lines changed
packages/react/src/components/checkout/payment
payment-methods/credit-card Expand file tree Collapse file tree 5 files changed +41
-12
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @godaddy/react " : patch
3+ ---
4+
5+ Add storeId and channelId for GDPayments Initialization
Original file line number Diff line number Diff line change @@ -377,8 +377,12 @@ export function ExpressCheckoutButton() {
377377 // couponConfig,
378378 // });
379379 collect . current = new ( window as any ) . TokenizeJs (
380- godaddyPaymentsConfig ?. businessId || session ?. businessId ,
381- godaddyPaymentsConfig ?. appId ,
380+ {
381+ businessId : godaddyPaymentsConfig ?. businessId || session ?. businessId ,
382+ storeId : session ?. storeId ,
383+ channelId : session ?. channelId ,
384+ applicationId : godaddyPaymentsConfig ?. appId ,
385+ } ,
382386 {
383387 country : countryCode ,
384388 currency : currencyCode ,
@@ -394,7 +398,11 @@ export function ExpressCheckoutButton() {
394398 godaddyPaymentsConfig ,
395399 countryCode ,
396400 currencyCode ,
397- session ,
401+ session ?. businessId ,
402+ session ?. storeId ,
403+ session ?. channelId ,
404+ session ?. enablePromotionCodes ,
405+ session ?. storeName ,
398406 isPoyntLoaded ,
399407 isCollectLoading ,
400408 calculatedAdjustments ,
Original file line number Diff line number Diff line change @@ -107,8 +107,12 @@ export function PazeCheckoutButton() {
107107 ) {
108108 // console.log("[poynt collect] Initializing TokenizeJs instance");
109109 collect . current = new ( window as any ) . TokenizeJs (
110- godaddyPaymentsConfig ?. businessId || session ?. businessId ,
111- godaddyPaymentsConfig ?. appId ,
110+ {
111+ businessId : godaddyPaymentsConfig ?. businessId || session ?. businessId ,
112+ storeId : session ?. storeId ,
113+ channelId : session ?. channelId ,
114+ applicationId : godaddyPaymentsConfig ?. appId ,
115+ } ,
112116 {
113117 country : countryCode ,
114118 currency : currencyCode ,
@@ -123,7 +127,9 @@ export function PazeCheckoutButton() {
123127 godaddyPaymentsConfig ,
124128 countryCode ,
125129 currencyCode ,
126- session ,
130+ session ?. businessId ,
131+ session ?. storeId ,
132+ session ?. channelId ,
127133 isPoyntLoaded ,
128134 isCollectLoading ,
129135 ] ) ;
Original file line number Diff line number Diff line change @@ -156,8 +156,12 @@ export function PaymentForm(
156156 session ?. paymentMethods ?. paze ?. processor === PaymentProvider . GODADDY
157157 ) {
158158 collect . current = new ( window as any ) . TokenizeJs (
159- godaddyPaymentsConfig ?. businessId || session ?. businessId ,
160- godaddyPaymentsConfig ?. appId ,
159+ {
160+ businessId : godaddyPaymentsConfig ?. businessId || session ?. businessId ,
161+ storeId : session ?. storeId ,
162+ channelId : session ?. channelId ,
163+ applicationId : godaddyPaymentsConfig ?. appId ,
164+ } ,
161165 {
162166 country : countryCode ,
163167 currency : currencyCode ,
@@ -180,6 +184,8 @@ export function PaymentForm(
180184 session ?. paymentMethods ?. paze ?. processor ,
181185 session ?. storeName ,
182186 session ?. businessId ,
187+ session ?. storeId ,
188+ session ?. channelId ,
183189 isPoyntLoaded ,
184190 ] ) ;
185191
Original file line number Diff line number Diff line change @@ -195,10 +195,12 @@ export function GoDaddyCreditCardForm() {
195195 )
196196 return ;
197197
198- collect . current = new ( window as any ) . TokenizeJs (
199- godaddyPaymentsConfig ?. businessId || session ?. businessId ,
200- godaddyPaymentsConfig ?. appId
201- ) ;
198+ collect . current = new ( window as any ) . TokenizeJs ( {
199+ businessId : godaddyPaymentsConfig ?. businessId || session ?. businessId ,
200+ storeId : session ?. storeId ,
201+ channelId : session ?. channelId ,
202+ applicationId : godaddyPaymentsConfig ?. appId ,
203+ } ) ;
202204
203205 collect ?. current ?. on ( 'ready' , ( ) => {
204206 setCollect ( collect . current ) ;
@@ -248,6 +250,8 @@ export function GoDaddyCreditCardForm() {
248250 t ,
249251 setIsLoadingNonce ,
250252 session ?. businessId ,
253+ session ?. storeId ,
254+ session ?. channelId ,
251255 ] ) ;
252256
253257 return (
You can’t perform that action at this time.
0 commit comments