diff --git a/src/modules/payment-gateway/components/payment-gateway-select.tsx b/src/modules/payment-gateway/components/payment-gateway-select.tsx index 0d3c2fe..2696814 100644 --- a/src/modules/payment-gateway/components/payment-gateway-select.tsx +++ b/src/modules/payment-gateway/components/payment-gateway-select.tsx @@ -71,9 +71,8 @@ export const PaymentGatewaySelect = (props: { return await redirectToStripeDropin({ paymentGatewayId: data.paymentGatewayId, }); - - break; } + case "app.saleor.adyen_staging": case "app.saleor.adyen": { toast({ title: "Payment gateway selected", @@ -85,6 +84,12 @@ export const PaymentGatewaySelect = (props: { }); } default: { + toast({ + title: "Not supported payment gateway", + description: `The payment gateway ${data.paymentGatewayId} is not supported.`, + variant: "destructive", + }); + throw new Error( "Payment gateway is not supported. Check either app.saleor.stripe or app.saleor.adyen", ); diff --git a/src/modules/stripe/components/stripe-checkout-form.tsx b/src/modules/stripe/components/stripe-checkout-form.tsx index 4b68de4..d6282a4 100644 --- a/src/modules/stripe/components/stripe-checkout-form.tsx +++ b/src/modules/stripe/components/stripe-checkout-form.tsx @@ -8,7 +8,7 @@ import { import { loadStripe } from "@stripe/stripe-js"; import { useState } from "react"; -import { Button } from "@/components/ui/button"; +import { FormButton } from "@/components/form-button"; import { toast } from "@/components/ui/use-toast"; import { BaseError } from "@/lib/errors"; import { createPath } from "@/lib/utils"; @@ -165,20 +165,15 @@ export const StripeCheckoutFormWrapped = (props: {
);