From eda53c3a9ea931bead71c6fa1e3c35fec40fcfdc Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 10 Jun 2024 16:38:55 +0300 Subject: [PATCH 1/3] fix ID of stripe provider module --- src/modules/checkout/components/payment-button/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/checkout/components/payment-button/index.tsx b/src/modules/checkout/components/payment-button/index.tsx index 933cdff5c..4cbdc2d92 100644 --- a/src/modules/checkout/components/payment-button/index.tsx +++ b/src/modules/checkout/components/payment-button/index.tsx @@ -39,7 +39,7 @@ const PaymentButton: React.FC = ({ const paymentSession = cart.payment_collection?.payment_sessions?.[0] switch (paymentSession?.provider_id) { - case "stripe": + case "pp_stripe_stripe": return ( Date: Mon, 10 Jun 2024 16:41:36 +0300 Subject: [PATCH 2/3] changed to switch cases --- .../checkout/components/payment-button/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/checkout/components/payment-button/index.tsx b/src/modules/checkout/components/payment-button/index.tsx index 4cbdc2d92..cd111518c 100644 --- a/src/modules/checkout/components/payment-button/index.tsx +++ b/src/modules/checkout/components/payment-button/index.tsx @@ -38,8 +38,8 @@ const PaymentButton: React.FC = ({ const paymentSession = cart.payment_collection?.payment_sessions?.[0] - switch (paymentSession?.provider_id) { - case "pp_stripe_stripe": + switch (true) { + case paymentSession?.provider_id.startsWith("pp_stripe"): return ( = ({ data-testid={dataTestId} /> ) - case "manual": - case "pp_system_default": + case paymentSession?.provider_id.startsWith("manual"): + case paymentSession?.provider_id.startsWith("pp_system_default"): return ( ) - case "paypal": + case paymentSession?.provider_id.startsWith("pp_paypal"): return ( Date: Mon, 10 Jun 2024 16:43:07 +0300 Subject: [PATCH 3/3] fix stripe ID --- src/modules/checkout/components/payment-button/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/checkout/components/payment-button/index.tsx b/src/modules/checkout/components/payment-button/index.tsx index cd111518c..327ffb85a 100644 --- a/src/modules/checkout/components/payment-button/index.tsx +++ b/src/modules/checkout/components/payment-button/index.tsx @@ -39,7 +39,7 @@ const PaymentButton: React.FC = ({ const paymentSession = cart.payment_collection?.payment_sessions?.[0] switch (true) { - case paymentSession?.provider_id.startsWith("pp_stripe"): + case paymentSession?.provider_id.startsWith("pp_stripe_"): return (