I'm working on project with main theme - sales. So, for front end (React) and Backend(PHP).
I had a problem understanding how to use my smart contract in the project. For deploy i use ethereum wallet 0.9.0 and test network Rinkeby. In EW he is working.
Let's pretend that I have button buy in my code, and, i have function in my contract like:
function Buy()
public
payable
{
require (msg.sender != seller);
require (msg.value >= price);
orderNum++;
safePay +=msg.value;
}
Now, how i can use it? I heard about web3.js, but (i'm not sure) i need php requests for this.
Or, if my contract deploy in ethereum-wallet Rinkeby i can use it straight from just code and don't need deploy again.
I'm beginner in this theme and can do mistake (even in the view), but will be very glad, if someone can explain this.
Thanks.