feat: Delete Stripe payment method

This commit is contained in:
Ahmed Bouhuolia
2024-09-22 14:30:47 +02:00
parent c0a4c965f0
commit 3129c76c30
12 changed files with 262 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ export class PaymentServicesController extends BaseController {
param('paymentMethodId').exists(),
body('name').optional().isString(),
body('options.bankAccountId').optional().isNumeric(),
body('options.clearningAccountId').optional().isNumeric(),
body('options.clearingAccountId').optional().isNumeric(),
body('options.showVisa').optional().isBoolean(),
body('options.showMasterCard').optional().isBoolean(),
body('options.showDiscover').optional().isBoolean(),

View File

@@ -26,6 +26,7 @@ export class GetPaymentMethodsStateService {
const isStripeAccountCreated = !!stripePayment;
const isStripePaymentActive = !!(stripePayment?.active || null);
const stripePaymentMethodId = stripePayment?.id || null;
const stripeAccountId = stripePayment?.accountId || null;
const stripePublishableKey = config.stripePayment.publishableKey;
const stripeCurrencies = ['USD', 'EUR'];
@@ -36,6 +37,7 @@ export class GetPaymentMethodsStateService {
isStripeAccountCreated,
isStripePaymentActive,
stripeAccountId,
stripePaymentMethodId,
stripePublishableKey,
stripeCurrencies,
stripeRedirectUrl,

View File

@@ -18,6 +18,7 @@ export interface GetPaymentMethodsPOJO {
isStripeAccountCreated: boolean;
isStripePaymentActive: boolean;
stripeAccountId: string | null;
stripePaymentMethodId: number | null;
stripePublishableKey: string | null;
stripeCurrencies: Array<string>;
stripeRedirectUrl: string | null;