diff --git a/src/views/Affiliate/PayAffiliate.jsx b/src/views/Affiliate/PayAffiliate.jsx index 7349921..6720840 100644 --- a/src/views/Affiliate/PayAffiliate.jsx +++ b/src/views/Affiliate/PayAffiliate.jsx @@ -109,6 +109,31 @@ const PayAffiliate = () => { fetchPayData(); }, []); + const initiatePayout = async () => { + try { + const response = await axios.post( + `/api/v1/affiliate/payout`, + { + amountToPay, + nameAsBank, + accountNo, + ifsc, + bankName, + branchName, + affiliateDiscountAmt, + }, + { + headers: { + Authorization: `Bearer ${token}`, + }, + } + ); + console.log(response.data); + } catch (error) { + console.error(error); + } + }; + return ( <>