Skip to content

Commit fc1e06e

Browse files
committed
payments sample PR feedback
1 parent 4f0d50b commit fc1e06e

File tree

1 file changed

+3
-0
lines changed
  • sample-apps/payment-customizations/extensions/payment-customization-js/src

1 file changed

+3
-0
lines changed

sample-apps/payment-customizations/extensions/payment-customization-js/src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export default /**
2727
const configuration = JSON.parse(
2828
input?.paymentCustomization?.metafield?.value ?? "{}"
2929
);
30+
if (!configuration.paymentMethodName || !configuration.cartTotal) {
31+
return NO_CHANGES;
32+
}
3033

3134
const cartTotal = parseFloat(input.cart.cost.totalAmount.amount ?? "0.0");
3235
if (cartTotal < configuration.cartTotal) {

0 commit comments

Comments
 (0)