Skip to content

[CAL-767] RFC: PaymentGate/PaymentService #6438

@alannnc

Description

@alannnc

Discussed in https://github.com/calcom/cal.com/discussions/6360

Originally posted by zomars January 9, 2023
TLDR;

  • Create a generic class Similar to CalendarService it can be called either PaymentGate or PaymentService to remain consistent to CalendarService (although VideoApiAdapter should be called VideoService as well).
  • Abstract the whole Stripe payment logic into PaymentService (handlePayment,getPaymentData, etc)
  • Once abstracted, make it possible for App Store apps to implement PaymentService like WIP: implementation lightning network app #6320

Figma link to new booking diagram:

https://www.figma.com/file/XpESBxrGBdRL08lng1HZHU/handleNewBooking?node-id=0%3A1&t=wXYUsjggRXRyZAi5-1

In the case for PaymentService it can go two ways.

  1. Act as a Gate where you first pay and booking gets created and auto confirmed.
  2. Act as a "confirmation" Gate where you can create an unconfirmed booking, THEN pay and auto confirm. (this is how currently works with Stripe)

CAL-767

Metadata

Metadata

Assignees

Labels

linearSync Github Issue from community members to Linear.app✨ featureNew feature or request🧹 ImprovementsImprovements to existing features. Mostly UX/UI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions