Receiving Payments
Learn how to receive payments via a smart contract.
We'll cover the following...
We'll cover the following...
Receive payments
We can now store addresses and split ratios inside a smart contract. Let’s update our contract so that it can also receive payments. Let’s start by writing a failing test for this:
Let’s take a look at the code above:
Lines 23–26: We use the
owner.sendTransaction()function to send Ethers the contract from theowneraccount. ...