Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Build hitpay app for cal.com #1

Draft
wants to merge 1,186 commits into
base: main
Choose a base branch
from
Draft

Conversation

MuhammadAimanSulaiman
Copy link
Collaborator

Adding hitpay functions to hitpay app

Comment on lines 1 to 13
// import { createDefaultInstallation } from "@calcom/app-store/_utils/installation";
// import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
// import appConfig from "../config.json";
// const handler: AppDeclarativeHandler = {
// appType: appConfig.type,
// variant: appConfig.variant,
// slug: appConfig.slug,
// supportsMultipleInstalls: false,
// handlerType: "add",
// createCredential: ({ appType, user, slug, teamId }) =>
// createDefaultInstallation({ appType, user: user, slug, key: {}, teamId }),
// };
// export default handler;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MuhammadAimanSulaiman, please remove.

@@ -0,0 +1,39 @@
// import type { Prisma } from "@prisma/client";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it

@@ -0,0 +1,61 @@
import type { NextApiRequest, NextApiResponse } from "next";
// import getRawBody from "raw-body";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it

bookerName: string,
paymentOption: PaymentOption,
bookerEmail: string
// bookerPhoneNumber?: string | null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove unused code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted all unused code

value: z.string(),
});

export const paymentOptionsSchema = z.array(paymentOptionSchema);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't need paymentOptionsSchema, please remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused images

Copy link
Collaborator Author

@MuhammadAimanSulaiman MuhammadAimanSulaiman Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The images are for the description on cal app store.
We shouldn't remove them and should replace them with ones related to hitpay.

saltKey: string | null;
}

export interface IHitPayWebhookEventReturn {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused interface IHitPayWebhookEventReturn

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it

import { useEffect } from "react";
import { z } from "zod";

// import type { PaymentPageProps } from "@calcom/features/ee/payments/pages/payment";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it, please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it

// Will be parsed on render
data: unknown;
};
// paymentPageProps: PaymentPageProps;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it, please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it


export const HitpayPaymentComponent = (props: IPaymentComponentProps) => {
const { payment } = props;
console.log("HitpayPaymentComponent payment prop =>", payment);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it, please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it

import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert, Select, TextField } from "@calcom/ui";

import { paymentOptions } from "../lib/constants";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change with import { paymentOptions } from "../lib";

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it

const { getAppData, setAppData, disabled } = useAppContextWithSchema<typeof appDataSchema>();
const { enabled, updateEnabled } = useIsAppEnabled(app);
const otherPaymentAppEnabled = checkForMultiplePaymentApps(eventTypeFormMetadata);
const [requirePayment, setRequirePayment] = useState(getAppData("enabled"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove setRequirePayment if we don't need it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it

Copy link

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Integrating hitpay functions to hitpay app". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@MuhammadAimanSulaiman MuhammadAimanSulaiman changed the title Integrating hitpay functions to hitpay app feat: Build hitpay app for cal.com Oct 23, 2024
@MuhammadAimanSulaiman MuhammadAimanSulaiman force-pushed the hitpay-app branch 2 times, most recently from d625967 to effe6c5 Compare October 23, 2024 12:08
anikdhabal and others added 16 commits December 16, 2024 15:30
* perf: insights perf improvement

* removed additional const
* fix: trigger guest no show

* test: add tests for trigger guest no show
* chore: Add perf tracing for handleNewBooking

* Added a few more to the event manager

* Added the sentry wrapper that enables perf tracing

* Revert "Added a few more to the event manager"

This reverts commit ccf3ee5.

* Fixed where we wrap sentry

* Reverse sentry wrapper
* fetch only 5 hosts and only first user

* refactor

* limit to 3
* chore: improve prisma exception filter messages

* fixup! chore: improve prisma exception filter messages
…n api for better documentation (calcom#18208)

* update decorators 1

* update decorators 2

* update decorators 3

* update decorators 4

* update decorators 4

* update decorators 6

* update decorators 7

* added documentation,json and openapi.json

* implemented feedback

* remove default values from update dto's

* update

* removed default from redirectUris
joeauyeung and others added 30 commits January 9, 2025 20:24
* Upgrade jsforce to 3.6.2

* Refactor connecting to Salesforce

* Revert yarn.lock changes

* Migrate callback endpoint

* Add jsforce node dependency

* Migrate add endpoint

* Import

* Import package into crmService

* Use new package types

* Type fix

* Update vite config

* Push updated lockfile

* Attempt to bump platform/libraries to unlock jsforce

* Also update lockfile, naturally

* bump platform libraries

* Update vite.config

* Add jsforce to vite config

* fixup! Merge branch 'main' into upgrade-jsforce-v3

* fixup! fixup! Merge branch 'main' into upgrade-jsforce-v3

---------

Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Morgan <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
* fix: improve filters at /bookings

* fix type
* chore: skip failure e2e test

* Update .env

* Update manage-booking-questions.e2e.ts

* Update manage-booking-questions.e2e.ts

* Update manage-booking-questions.e2e.ts

* Update manage-booking-questions.e2e.ts

* Update manage-booking-questions.e2e.ts

* Update manage-booking-questions.e2e.ts

* Update .env

* Update manage-booking-questions.e2e.ts

* fix

* fix flake

* Update saml.e2e.ts
* Update mint.json

* fix broken links

---------

Co-authored-by: Peer Richelsen <[email protected]>
* feat: added pagination to platform managed users table

* removed console

* implemented feedback, removed unused components

* added label

* Update managed-users-view.tsx

* Update managed-users-view.tsx
* new granola app

* granola app
* fix: wrong Meeting Ended payload in zapier

* fix
* Create dub links if valid

* Map through filtered links

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
* Fix error

* remove indent

---------

Co-authored-by: CarinaWolli <[email protected]>
* chore: apps/[slug] remove pages router

* remove apps/[slug] pages from /future

* chore: apps/installed remove pages router

* chore: apps/installation remove pages router

* remove Head element

* fix metadata

* fix test

* fix another test

* chore: apps/categories remove pages router

* revert unneeded changes

* update middleware

* Remove <Head>

* remove unused import and code

* remove unused import and code again

* fix

* fix category page

* add split icon

* add /routing paths to middleware matcher

* wip

* remove HeadSeo from App.tsx

* clean up head-seo test

* add generateAppMetadata

* use generateAppMetadata in apps/[slug] page

* delete file

* remove log

* fix

* fix

* fix apps/installed pages

* fix cateogires pages

* fix

* fix imports

* wip

* fix

* fix

* fix metadata

* fix

* redirect /apps/routing-forms to /routing

* replace all usages of /apps/routing-forms to /routing

* better naming

* /routing -> /routing/forms

* fix

* fix

* fix

* fix

* remove backPath as it is irrelevant when withoutMain is true

* fix type checks

* fix type check in apps/[slug]

* refactors

* fix

* fix test

* fix

* fix

* fix

* Replace multiple leading slashes with a single slash

* migrate routing-forms too

* add re routing

* fix

* add redirection

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
* wip

* wip

* fix not found page

* render middleware for /settings pages

* fix

* remove global-error page

* add metadata to not-found page

* make not-found page static

* remove 404

* adding not-found to middleware is not necessary

* add every routes to config.matcher

* fix test

* fix style

* use i18n string

* fix tests

* fix

* fix

* revert unneeded changes

* fix

* fix

* fix

* fix style

* fix

* remove 404

* remove log

* fix

* fix

* fix

* fix

* better naming

* parallel testing

---------

Co-authored-by: Benny Joo <[email protected]>
…ages/_error` (calcom#18606)

* remove page/_error

* refactor app/error
…dling (calcom#18615)

* fix lint error

* fix booking page and better error handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.