diff --git a/src/app/payment/components/checkout/ProductCardComponent.tsx b/src/app/payment/components/checkout/ProductCardComponent.tsx index 393768c67..e2d7ae519 100644 --- a/src/app/payment/components/checkout/ProductCardComponent.tsx +++ b/src/app/payment/components/checkout/ProductCardComponent.tsx @@ -61,6 +61,11 @@ export const ProductFeaturesComponent = ({ const planAmount = getProductAmount(selectedPlan.decimalAmount, couponCodeData).toFixed(2); const upsellPlanAmount = upsellManager.amount && getProductAmount(upsellManager.amount, couponCodeData).toFixed(2); + const discountPercentage = + couponCodeData?.amountOff && couponCodeData?.amountOff < selectedPlan.amount + ? ((couponCodeData?.amountOff / selectedPlan.amount) * 100).toFixed(2) + : undefined; + return (
@@ -91,7 +96,7 @@ export const ProductFeaturesComponent = ({

{translate('checkout.productCard.saving', { - percent: couponCodeData?.percentOff, + percent: couponCodeData?.percentOff ?? discountPercentage, })}

diff --git a/src/app/payment/views/IntegratedCheckoutView/CheckoutView.tsx b/src/app/payment/views/IntegratedCheckoutView/CheckoutView.tsx index 840c09311..483958106 100644 --- a/src/app/payment/views/IntegratedCheckoutView/CheckoutView.tsx +++ b/src/app/payment/views/IntegratedCheckoutView/CheckoutView.tsx @@ -62,8 +62,11 @@ const CheckoutView = ({ }); function onAuthMethodToggled(authMethod: AuthMethodTypes) { + reset({ + email: '', + password: '', + }); checkoutViewManager.handleAuthMethodChange(authMethod); - reset(); } return (