Adds Stripe integration (#717)
* Adds Stripe integration * Moves Stripe instrucctions to ee * Adds NEXT_PUBLIC_APP_URL variable * Adds fallback for NEXT_PUBLIC_APP_URL * Throws error objects instead * Improved error handling * Removes deprecated method * Bug fixing * Payment refactoring * PaymentPage fixes * Fixes preview links * More preview link fixes * Fixes client links Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
52 files changed
+2214
-636
No files matched your search
@@ -1,7 +1,28 @@
|
||||
import { EventType, SchedulingType } from "@prisma/client";
|
||||
import { ClockIcon, InformationCircleIcon, UserIcon, UsersIcon } from "@heroicons/react/solid";
|
||||
import { SchedulingType } from "@prisma/client";
|
||||
import {
|
||||
ClockIcon,
|
||||
CreditCardIcon,
|
||||
InformationCircleIcon,
|
||||
UserIcon,
|
||||
UsersIcon,
|
||||
} from "@heroicons/react/solid";
|
||||
import React from "react";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import classNames from "@lib/classNames";
|
||||
import { FormattedNumber, IntlProvider } from "react-intl";
|
||||
|
||||
const eventTypeData = Prisma.validator<Prisma.EventTypeArgs>()({
|
||||
select: {
|
||||
id: true,
|
||||
length: true,
|
||||
price: true,
|
||||
currency: true,
|
||||
schedulingType: true,
|
||||
description: true,
|
||||
},
|
||||
});
|
||||
|
||||
type EventType = Prisma.EventTypeGetPayload<typeof eventTypeData>;
|
||||
|
||||
export type EventTypeDescriptionProps = {
|
||||
eventType: EventType;
|
||||
@@ -27,6 +48,18 @@ export const EventTypeDescription = ({ eventType, className }: EventTypeDescript
|
||||
1-on-1
|
||||
</li>
|
||||
)}
|
||||
{eventType.price > 0 && (
|
||||
<li className="flex whitespace-nowrap">
|
||||
<CreditCardIcon className="inline mt-0.5 mr-1.5 h-4 w-4 text-neutral-400" aria-hidden="true" />
|
||||
<IntlProvider locale="en">
|
||||
<FormattedNumber
|
||||
value={eventType.price / 100.0}
|
||||
style="currency"
|
||||
currency={eventType.currency.toUpperCase()}
|
||||
/>
|
||||
</IntlProvider>
|
||||
</li>
|
||||
)}
|
||||
{eventType.description && (
|
||||
<li className="flex">
|
||||
<InformationCircleIcon
|
||||
|
||||
Reference in new issue
Block a user