Skip to content

Commit 8b3fc01

Browse files
W-21241548: resolve conflicts
1 parent 4de025f commit 8b3fc01

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ const {handler} = runtime.createHandler(options, (app) => {
361361
// Default source for product images - replace with your CDN
362362
'*.commercecloud.salesforce.com',
363363
// TODO: Used to load icons
364-
'*.demandware.net'
364+
'*.demandware.net',
365+
'*.adyen.com'
365366
],
366367
'script-src': [
367368
// Used by the service worker in /worker/main.js

packages/template-retail-react-app/app/utils/sf-payments-utils.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ export const getSFPaymentsInstrument = (basketOrOrder) => {
2222
)
2323
}
2424

25+
/**
26+
* Returns the client secret from a payment instrument (e.g. Stripe PaymentIntent client_secret).
27+
* Used by express payment flows to pass through to the payment SDK.
28+
* @param {Object} paymentInstrument - Payment instrument with paymentReference.gatewayProperties
29+
* @returns {string|undefined} Client secret for the payment gateway, or undefined if not present
30+
*/
31+
export const getClientSecret = (paymentInstrument) => {
32+
return paymentInstrument?.paymentReference?.gatewayProperties?.stripe?.clientSecret
33+
}
34+
2535
/**
2636
* Transform billing and shipping address details from payment provider format to basket format.
2737
* Determines the appropriate source for billing address (PayPal/Venmo may not provide complete billing details).

0 commit comments

Comments
 (0)