This commit is contained in:
hamid zarghami
2025-02-08 14:20:50 +03:30
parent 1e8b542960
commit 19636230ba
19 changed files with 612 additions and 127 deletions
@@ -0,0 +1,27 @@
import axios from "../../../config/axios";
import { PaymentStatusType, RejectPaymentType } from "../types/PaymentTypes";
export const getPayments = async (page: number, type: PaymentStatusType) => {
const { data } = await axios.get(
`/payments/deposit/transfer?page=${page}&type=${type}`
);
return data;
};
export const approveTransfer = async (id: string) => {
const { data } = await axios.post(`/payments/deposit/transfer/approve/${id}`);
return data;
};
export const rejectTransfer = async (params: RejectPaymentType) => {
const { data } = await axios.post(
`/payments/deposit/transfer/reject/${params.id}`,
params
);
return data;
};
export const getPaymentGateways = async (page: number) => {
const { data } = await axios.get(`/payments/deposit/gateway?page=${page}`);
return data;
};