coupon correct
This commit is contained in:
parent
b52ed3912d
commit
9afc2f4979
@ -109,6 +109,31 @@ const PayAffiliate = () => {
|
|||||||
fetchPayData();
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="d-flex justify-content-end">
|
<div className="d-flex justify-content-end">
|
||||||
@ -232,6 +257,19 @@ const PayAffiliate = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* <hr />
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
sx={{ marginTop: "20px", mb: 3, textAlign: "center" }}
|
||||||
|
variant="contained"
|
||||||
|
onClick={initiatePayout}
|
||||||
|
color="success"
|
||||||
|
>
|
||||||
|
Affiliate Payout
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<hr /> */}
|
||||||
|
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-lg-12 col-md-12 col-sm-12 my-1">
|
<div className="col-lg-12 col-md-12 col-sm-12 my-1">
|
||||||
<div className="card">
|
<div className="card">
|
||||||
@ -293,7 +331,7 @@ const PayAffiliate = () => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
color="success"
|
color="success"
|
||||||
>
|
>
|
||||||
Pay
|
Save Payment
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user