mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: Stripe payment integration
This commit is contained in:
@@ -7,25 +7,6 @@ import {
|
||||
import useApiRequest from '../useRequest';
|
||||
|
||||
|
||||
// # Delete payment method
|
||||
// -----------------------------------------
|
||||
interface DeletePaymentMethodValues {
|
||||
paymentMethodId: number;
|
||||
}
|
||||
export const useDeletePaymentMethod = (
|
||||
options?: UseMutationOptions<void, Error, DeletePaymentMethodValues>,
|
||||
): UseMutationResult<void, Error, DeletePaymentMethodValues> => {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useMutation<void, Error, DeletePaymentMethodValues>(
|
||||
({ paymentMethodId }) => {
|
||||
return apiRequest
|
||||
.delete(`/payment-services/${paymentMethodId}`)
|
||||
.then((res) => res.data);
|
||||
},
|
||||
{ ...options },
|
||||
);
|
||||
};
|
||||
|
||||
// # Edit payment method
|
||||
// -----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user