From 9afc2f4979d0468e0a17bef22e3a1b4c3aef07d7 Mon Sep 17 00:00:00 2001 From: pawan-dot <71133473+pawan-dot@users.noreply.github.com> Date: Wed, 15 May 2024 13:35:32 +0530 Subject: [PATCH] coupon correct --- src/views/Affiliate/PayAffiliate.jsx | 40 +++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) 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 ( <>