From 7a7a5b528573bdb4a2b82dd9190486411deff077 Mon Sep 17 00:00:00 2001 From: alannnc Date: Mon, 21 Aug 2023 03:33:34 -0700 Subject: [PATCH] fix: Removing payment fee on stripe (#10652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Keith Williams Co-authored-by: Omar López Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> --- .../components/EventTypeAppCardInterface.tsx | 13 +------------ .../app-store/stripepayment/lib/PaymentService.ts | 12 ++---------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/app-store/stripepayment/components/EventTypeAppCardInterface.tsx b/packages/app-store/stripepayment/components/EventTypeAppCardInterface.tsx index 5d836866e7..bf048bf48e 100644 --- a/packages/app-store/stripepayment/components/EventTypeAppCardInterface.tsx +++ b/packages/app-store/stripepayment/components/EventTypeAppCardInterface.tsx @@ -45,18 +45,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ switchChecked={requirePayment} switchOnClick={(enabled) => { setRequirePayment(enabled); - }} - description={ - <> -
- {t("payment_app_commission", { - paymentFeePercentage: 0.5, - fee: 0.1, - formatParams: { fee: { currency } }, - })} -
- - }> + }}> <> {recurringEventDefined && ( diff --git a/packages/app-store/stripepayment/lib/PaymentService.ts b/packages/app-store/stripepayment/lib/PaymentService.ts index 9148384859..6211e77504 100644 --- a/packages/app-store/stripepayment/lib/PaymentService.ts +++ b/packages/app-store/stripepayment/lib/PaymentService.ts @@ -68,10 +68,6 @@ export class PaymentService implements IAbstractPaymentService { }, }); - // Parse keys with zod - const { payment_fee_fixed, payment_fee_percentage } = stripeAppKeysSchema.parse(stripeAppKeys?.keys); - const paymentFee = Math.round(payment.amount * payment_fee_percentage + payment_fee_fixed); - const customer = await retrieveOrCreateStripeCustomerByEmail( bookerEmail, this.credentials.stripe_user_id @@ -108,7 +104,7 @@ export class PaymentService implements IAbstractPaymentService { stripe_publishable_key: this.credentials.stripe_publishable_key, stripeAccount: this.credentials.stripe_user_id, }) as unknown as Prisma.InputJsonValue, - fee: paymentFee, + fee: 0, refunded: false, success: false, paymentOption: paymentOption || "ON_BOOKING", @@ -146,10 +142,6 @@ export class PaymentService implements IAbstractPaymentService { }, }); - // Parse keys with zod - const { payment_fee_fixed, payment_fee_percentage } = stripeAppKeysSchema.parse(stripeAppKeys?.keys); - const paymentFee = Math.round(payment.amount * payment_fee_percentage + payment_fee_fixed); - const customer = await retrieveOrCreateStripeCustomerByEmail( bookerEmail, this.credentials.stripe_user_id @@ -191,7 +183,7 @@ export class PaymentService implements IAbstractPaymentService { stripeAccount: this.credentials.stripe_user_id, } ) as unknown as Prisma.InputJsonValue, - fee: paymentFee, + fee: 0, refunded: false, success: false, paymentOption: paymentOption || "ON_BOOKING",