mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: Delete Stripe payment method
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user