Skip to content

Commit

Permalink
fix: Update on user location variables for the Payment Method Messagi…
Browse files Browse the repository at this point in the history
…ng Element
  • Loading branch information
julianajlk committed Apr 25, 2024
1 parent 836eaef commit 43dbffe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/payment/checkout/payment-form/StripePaymentForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ const StripePaymentForm = ({

// Check if should show PaymentMethodMessagingElement, as it only renders
// for specific countries, if country code and currency are known, and they must match
const userLocationCountryCode = new Cookies().get(getConfig().LOCATION_OVERRIDE_COOKIE)
|| new Cookies().get(getConfig().USER_LOCATION_COOKIE_NAME);
const userLocationCountryCode = new Cookies().get(getConfig().USER_LOCATION_COOKIE_NAME)
|| new Cookies().get(getConfig().LOCATION_OVERRIDE_COOKIE);
const shouldDisplayPaymentMethodMessagingElement = (
(!!userLocationCountryCode || !!locationCountryCode) && !!orderTotal && !!currency
!!(userLocationCountryCode || locationCountryCode) && !!orderTotal && !!currency
);

// Loading button should appear when: basket and stripe elements are loading, quantity is updating and not submitting
Expand Down
2 changes: 1 addition & 1 deletion src/payment/payment-methods/stripe/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default async function checkout(
const postData = formurlencoded({
payment_intent_id: result.paymentIntent.id,
skus,
dynamic_payment_methods_enabled: basket.isDynamicPaymentMethodsEnabled,
dynamic_payment_methods_enabled: basket.isDynamicPaymentMethodsEnabled || false,
});
await getAuthenticatedHttpClient()
.post(
Expand Down

0 comments on commit 43dbffe

Please sign in to comment.