Stripe add the ability to place hold on cards (#8022)

* Add payment option to schema

* Add payment option to Stripe zod

* Set payment option on event type

* Create manual payment intent in Stripe

* Set payment option from Stripe app

* Add payment option to DB

* Pass React.ReactNode to checkbox

* Create uncaptured payment intent

* WIP

* Capture card in setup intent

* Show charge card option

* Charge card from booking page

* Bug fixes

* Clean up

* Clean up app card

* Add no-show fee messaging on booking page

* Send payment email on payment & add price

* Fix messaging

* Create no show fee charged email

* Send charge fee collected email

* Disable submit on card failure

* Clean up

* Serverside prevent charging card again if already charged

* Only confirm booking if paid for

* Type fixes

* More type fixes

* More type fixes

* Type fix

* Type fixes

* UI changes

* Payment component rework

* Update apps/web/public/static/locales/en/common.json

Co-authored-by: Alex van Andel <[email protected]>

* Update apps/web/public/static/locales/en/common.json

Co-authored-by: Alex van Andel <[email protected]>

* Update apps/web/components/dialog/ChargeCardDialog.tsx

Co-authored-by: Alex van Andel <[email protected]>

* Update packages/trpc/server/routers/viewer/payments.tsx

Co-authored-by: Alex van Andel <[email protected]>

* Revert GTM config

* Adjust payment option dropdown

* Show alert when seats are set

* Small bug fixes

* Create collect card method

* clean up

* Prevent seats & charge no-show fee to be enabled together

* Do not charge no-show fee on unconfirmed bookings

* Add check to collect card method

* Webhook send request emails

* Fix some dark mode colours

* Change awaiting payment language

* Type fixes

* Set height of Select and TextField both to 38px to fix alignment

* Fix message seats & payment error message

* Type fix

---------

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Joe Au-YeungandAlex van Andel authored and GitHub committed 2023-04-11 23:44:14 +02:00
1 parent af0123a606
commit 817e20f11e
47 files changed
+1149 -221

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ const buttonClasses = cva(
fab: "rounded-full justify-center md:rounded-md radix-state-open:rotate-45 md:radix-state-open:rotate-0 transition-transform radix-state-open:shadown-none radix-state-open:ring-0 !shadow-none",
},
color: {
primary: "text-inverted",
primary: "",
secondary: "text-emphasis",
minimal: "text-emphasis",
destructive: "",
@@ -10,6 +10,7 @@ type Props = InputHTMLAttributes<HTMLInputElement> & {
informationIconText?: string;
error?: boolean;
className?: string;
descriptionClassName?: string;
};
const CheckboxField = forwardRef<HTMLInputElement, Props>(
@@ -34,7 +35,7 @@ const CheckboxField = forwardRef<HTMLInputElement, Props>(
</div>
)}
<div className="w-full">
<div className="relative flex items-start">
<div className="relative flex items-center">
{React.createElement(
descriptionAsLabel ? "label" : "div",
{
@@ -45,7 +46,7 @@ const CheckboxField = forwardRef<HTMLInputElement, Props>(
),
},
<>
<div className="flex h-5 items-center">
<div className="flex h-5 items-end">
<input
{...rest}
ref={ref}
@@ -61,7 +62,7 @@ const CheckboxField = forwardRef<HTMLInputElement, Props>(
)}
/>
</div>
<span className="text-sm">{description}</span>
<span className={classNames("text-sm", rest.descriptionClassName)}>{description}</span>
</>
)}
{/* {informationIconText && <InfoBadge content={informationIconText}></InfoBadge>} */}