Hi, I am new to XDC. I have below payable function in my contact
function buyTokens(address beneficiary) public payable {
}
When I try to call from Remix, XDCPay amount shows 0 (zero) and not able to edit and send funds to buyTokens function.
What could be the reason? Can you help me
Discussion (2)
Can you please share your contract or the buyTokens function code over here to understand more about your issue
function buyTokens(address beneficiary) public payable {
uint256 tokens = msg.value * 10;
_token.transferFrom(_wallet, beneficiary, tokens);
emit TokensPurchased(_msgSender(), beneficiary, msg.value, tokens);
_forwardFunds();
}