diff --git a/server/paymentProviders/stripe/common.ts b/server/paymentProviders/stripe/common.ts index d74964d61c7..73482dcdcb9 100644 --- a/server/paymentProviders/stripe/common.ts +++ b/server/paymentProviders/stripe/common.ts @@ -54,11 +54,6 @@ export const refundTransaction = async ( { stripeAccount: hostStripeAccount.username }, ); - // if (options?.checkRefundStatus && refund.status !== 'succeeded') { - // await transaction.update({ data: { ...transaction.data, refund } }); - // return null; - // } - const charge = await stripe.charges.retrieve(chargeId, { stripeAccount: hostStripeAccount.username }); const refundBalance = await stripe.balanceTransactions.retrieve(refund.balance_transaction as string, { stripeAccount: hostStripeAccount.username, diff --git a/test/server/graphql/v2/collection/TransactionCollectionQuery.test.ts b/test/server/graphql/v2/collection/TransactionCollectionQuery.test.ts index 2d43d441f5d..37732882ad9 100644 --- a/test/server/graphql/v2/collection/TransactionCollectionQuery.test.ts +++ b/test/server/graphql/v2/collection/TransactionCollectionQuery.test.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; import gql from 'fake-tag'; +import type Stripe from 'stripe'; import { PAYMENT_METHOD_SERVICE, PAYMENT_METHOD_TYPE } from '../../../../../server/constants/paymentMethods'; import { TransactionKind } from '../../../../../server/constants/transaction-kind'; @@ -134,7 +135,7 @@ describe('server/graphql/v2/collection/TransactionCollection', () => { kind: TransactionKind.CONTRIBUTION, amount: -15000, PaymentMethodId: creditCardPm.id, - data: { charge: { id: 'ch_123' } }, + data: { charge: { id: 'ch_123' } as Stripe.Charge }, OrderId: order.id, }), fakeTransaction({