02425702d1
* Enables require confirmation after payment its made * Various Stripe improvements * Use constant * Merge branch 'main' into fixes/stripe-improvements * Update getStripeAppKeys.ts * submodule sync * Submodule sync * Revert * Update apps/web/components/booking/BookingListItem.tsx Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Alan <alannnc@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
20 lines
537 B
TypeScript
20 lines
537 B
TypeScript
import { stringify } from "querystring";
|
|
|
|
import { WEBSITE_URL } from "@calcom/lib/constants";
|
|
|
|
export type Maybe<T> = T | undefined | null;
|
|
|
|
export function createPaymentLink(opts: {
|
|
paymentUid: string;
|
|
name?: Maybe<string>;
|
|
date?: Maybe<string>;
|
|
email?: Maybe<string>;
|
|
absolute?: boolean;
|
|
}): string {
|
|
const { paymentUid, name, email, date, absolute = true } = opts;
|
|
let link = "";
|
|
if (absolute) link = WEBSITE_URL;
|
|
const query = stringify({ date, name, email });
|
|
return link + `/payment/${paymentUid}?${query}`;
|
|
}
|