mapping(uint => Product) public products;
struct Product {
uint id;
string name;
uint price;
address payable owner;
bool purchased;
}
function purchaseProduct(unit _id) public payable {
Product memory _product = products[_id];
address payable _seller = _product.owner;
address payable _buyer = msg.sender;
}
address(_seller).transfer(msg.value) works good.
But msg.sender.transfer(msg.value) and address(_buyer).transfer(msg.value) doesn't work.
please help me to fix this issue.