Skip to content

Commit be3fe34

Browse files
author
mmccullom
committed
apple pay fix
1 parent 26d51d5 commit be3fe34

File tree

2 files changed

+28
-31
lines changed

2 files changed

+28
-31
lines changed

packages/template-retail-react-app/app/ssr.js

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2023, Salesforce, Inc.
3+
* All rights reserved.
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+
*/
7+
8+
/*
9+
* Developer note! When updating this file, make sure to also update the
10+
* ssr.js template files in pwa-kit-create-app.
11+
*
12+
* In the pwa-kit-create-app, the templates are found under:
13+
* - assets/bootstrap/js/overrides/app/ssr.js.hbs
14+
* - assets/templates/@salesforce/retail-react-app/app/ssr.js.hbs
15+
*/
16+
117
'use strict'
218

319
import crypto from 'crypto'
@@ -291,26 +307,17 @@ const {handler} = runtime.createHandler(options, (app) => {
291307
'img-src': [
292308
// Default source for product images - replace with your CDN
293309
'*.commercecloud.salesforce.com',
294-
'checkoutshopper-test.adyen.com',
295-
// Allow Google Pay specific imgs
296-
'https://www.gstatic.com/images/icons/material/system/1x/payment_white_36dp.png',
297-
'https://www.gstatic.com/instantbuy/svg/dark_gpay.svg'
310+
'checkoutshopper-test.adyen.com'
298311
],
299312
'script-src': [
300313
// Used by the service worker in /worker/main.js
301-
'storage.googleapis.com',
302-
'https://pay.google.com/gp/p/js/pay.js',
303-
'*.test1.my.pc-rnd.site.com',
304-
'*.adyen.com',
305-
'https://checkoutshopper-test.adyen.com',
306-
'checkoutshopper-test.adyen.com'
314+
'storage.googleapis.com'
307315
],
308316
'connect-src': [
309317
// Connect to Einstein APIs
310318
'api.cquotient.com',
311319
// Connect to DataCloud APIs
312320
'*.c360a.salesforce.com',
313-
'*.test1.my.pc-rnd.salesforce-scrt.com',
314321
'https://api.lab.amplitude.com/sdk/vardata',
315322
'*.adyen.com',
316323
// Connect to SCRT2 URLs
@@ -319,19 +326,9 @@ const {handler} = runtime.createHandler(options, (app) => {
319326
'frame-src': [
320327
// Allow frames from Salesforce site.com (Needed for MIAW)
321328
'*.site.com',
322-
'*.test1.my.pc-rnd.salesforce-scrt.com',
323-
'*.test1.my.pc-rnd.site.com',
324-
'checkoutshopper-test.adyen.com',
325-
// Allow Google Pay Specific frames
326-
'https://pay.google.com'
329+
'checkoutshopper-test.adyen.com'
327330
],
328-
'frame-ancestors': [
329-
"'self'",
330-
// MIAW
331-
'https://orgfarm-b31c63e95f.test1.my.pc-rnd.site.com',
332-
// PWA
333-
'https://agent-checkout-payme-production.mobify-storefront.com'
334-
]
331+
'frame-ancestors': ["'self'"]
335332
}
336333
}
337334
})
@@ -413,8 +410,8 @@ const {handler} = runtime.createHandler(options, (app) => {
413410
* }
414411
*/
415412
registerAdyenEndpoints(app, runtime)
416-
417413
app.get('*', runtime.render)
418414
})
419415
// SSR requires that we export a single handler function called 'get', that
416+
// supports AWS use of the server that we created above.
420417
export const get = handler

packages/template-retail-react-app/config/default.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = {
3535
landingPath: '/reset-password-landing'
3636
}
3737
},
38-
defaultSite: 'RefArch',
38+
defaultSite: 'RefArchGlobal',
3939
siteAliases: {
4040
RefArch: 'us',
4141
RefArchGlobal: 'global'
@@ -44,10 +44,10 @@ module.exports = {
4444
commerceAPI: {
4545
proxyPath: `/mobify/proxy/api`,
4646
parameters: {
47-
clientId: 'c2804605-c747-4338-a702-7deeac41540b',
48-
organizationId: 'f_ecom_zyom_004',
49-
shortCode: 'sandbox-001',
50-
siteId: 'RefArch'
47+
clientId: 'c9c45bfd-0ed3-4aa2-9971-40f88962b836',
48+
organizationId: 'f_ecom_zzrf_001',
49+
shortCode: '8o7m175y',
50+
siteId: 'RefArchGlobal'
5151
}
5252
},
5353
einsteinAPI: {
@@ -77,11 +77,11 @@ module.exports = {
7777
ssrFunctionNodeVersion: '22.x',
7878
proxyConfigs: [
7979
{
80-
host: 'sandbox-001.api.commercecloud.salesforce.com',
80+
host: 'kv7kzm78.api.commercecloud.salesforce.com',
8181
path: 'api'
8282
},
8383
{
84-
host: 'zyom-004.unified.demandware.net',
84+
host: 'zzrf-001.dx.commercecloud.salesforce.com',
8585
path: 'ocapi'
8686
}
8787
]

0 commit comments

Comments
 (0)