feat: Edit stripe payment integation drawer

This commit is contained in:
Ahmed Bouhuolia
2024-09-22 12:52:59 +02:00
parent e04f5d26a3
commit c0a4c965f0
13 changed files with 399 additions and 13 deletions

View File

@@ -33,7 +33,16 @@ export const useGetPaymentServices = (
);
};
export interface GetPaymentServicesStateResponse {}
export interface GetPaymentServicesStateResponse {
stripe: {
isStripeAccountCreated: boolean;
isStripePaymentActive: boolean;
stripeAccountId: string;
stripeCurrencies: string[];
stripePublishableKey: string;
stripeRedirectUrl: string;
};
}
/**
* Retrieves the state of payment services.
* @param {UseQueryOptions<GetPaymentServicesStateResponse, Error>} options
@@ -52,7 +61,7 @@ export const useGetPaymentServicesState = (
.then(
(response) =>
transformToCamelCase(
response.data?.paymentServicesState,
response.data?.data,
) as GetPaymentServicesStateResponse,
),
{