"When Simon saw that the Spirit was given at the laying on of the apostles' hands, he offered money..." (Acts 8:18); "I counsel you to buy from me gold refined in the fire, so you can become rich..." (Revelation 3:18).
"Greek agoradzo, to be in the marketplace; to do business there. The word is used here in the sense of doing business with God on His terms. Man sold himself a slave to sin and Satan. God paid the price of his redemption. Man is now obligated to meet God's terms of faith, repentance, and service if he wants to be redeemed. The word is not used here of man actually paying a price in money, goods, exchanging material things for the gold, raiment and ointment of v.18, but rather of his paying the price of renouncing Satan, repenting of sins, and consecrating to God in face of suffering persecution such as Christians must suffer for Christ (v.19; 2 Tim. 3:12)." Source Unknown.
Simon the magician thought he could buy religion, much like we think we can buy happiness. His mind-set couldn't comprehend that both religion and happiness are byproducts of a greater search for God Himself. We won't get it simply because we want it. The minister or friend who tells us so is tickling our fancies and telling us what we want to hear. Human nature loves the gold but doesn't like to search for it.
What is free cannot be bought. The word simony developed from this wish to purchase spiritual offices. Simon was ready to trade eternal life for temporal power and God's glory for his own personal fame. God advises us to "buy from [him] gold refined in the fire" with our earnest prayers, repentance and hunger for Christ's righteousness. This is the only price he asks for his love and forgiveness.