How can I achieve a functionality where an action is performed after a payment is received?

+1 vote

I am building a website with condition based payment receiving functionality. Now, what I want is that there should be an option to someone wants to get their blog post ranked higher or pinned to the top of our website: a person buys that feature for 0.2 ETH, the system checks our wallet for the customer's address and the amount, and then runs a script which would pin the blog post to the top of the website automatically.

Apr 20, 2018 in Blockchain by anonymous

edited Aug 9, 2018 by Omkar 27 views

1 answer to this question.

+1 vote

See this can be achieved in more than one ways: You can achieve this with event triggering code in solidity smart contract where you can write a condition to trigger the payment after payment is received. Also, for Off-chain there is a server waiting for the event and when it is trigered it perform the required action.

answered Apr 20, 2018 by Perry
• 17,020 points

Related Questions In Blockchain

+1 vote
2 answers
+1 vote
2 answers

Can I include real world data in a smart contract? If so, how?

You cant access/embed real world data using ...READ MORE

answered Jul 17, 2018 in Blockchain by sapan
73 views
+1 vote
1 answer

How can I initiate a transaction on ethereum private network using mobile device?

There is no android wallet to connect ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,350 points
64 views
0 votes
1 answer

How can i create a simple P2P network on a blockchain?

To develop your own cryptocurrency, you need ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
190 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
172 views
0 votes
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
92 views
0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,020 points

edited Aug 10, 2018 by Omkar 514 views
0 votes
1 answer

How is a request sent from an app to a smart contract?

Yes, the contract is distributed by every node ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,020 points
62 views