File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
packages/template-retail-react-app/app/components/sf-payments-express-buttons Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,13 @@ const SFPaymentsExpressButtons = ({
270270 // Find SF Payments payment instrument in created order
271271 const orderPaymentInstrument = getSFPaymentsInstrument ( order )
272272
273+ // Build the return URL (needed for updatePaymentInstrumentForOrder )
274+ const baseReturnUrl = `${ window . location . protocol } //${ window . location . host } /checkout/payment-processing`
275+ paymentData . returnUrl = baseReturnUrl +
276+ '?orderNo=' + encodeURIComponent ( createdOrderNo ) +
277+ '&zoneId=' + encodeURIComponent ( zoneId ) +
278+ '&type=' + encodeURIComponent ( paymentType )
279+
273280 try {
274281 const paymentInstrumentBody = createPaymentInstrumentBody ( {
275282 amount : order . orderTotal ,
@@ -944,15 +951,7 @@ const SFPaymentsExpressButtons = ({
944951
945952 const paymentMethodSet = {
946953 paymentMethods : paymentConfig . paymentMethods ,
947- // inject country code into payment method set accounts (Adyen seems to need it but Stripe works with/without it)
948- paymentMethodSetAccounts :
949- paymentConfig . paymentMethodSetAccounts ?. map ( ( account ) => ( {
950- ...account ,
951- config : {
952- ...account . config ,
953- country : paymentCountryCode || fallbackCountryCode || 'US' // Inject country here
954- }
955- } ) ) || [ ]
954+ paymentMethodSetAccounts : paymentConfig . paymentMethodSetAccounts || [ ]
956955 }
957956 const config = {
958957 theme : buildTheme ( {
You can’t perform that action at this time.
0 commit comments