There is a mapping in my code as mapping(address => uint) private Payment;
. This mapping is used to see who send some ether and how much the sent value is. Its key is an address
that stores address of sender and its value is uint
that stores the sent value. I need this mapping's records be evaluated in fallback function. So, i write the followed fallback:
function() external payable{
Payment[msg.sender]=msg.value;
}
But, whenever i pay some ethers to the contract with Metamask, the transaction will be failed. What should i do?