1

I have a shopping website and I decide to use Ethereum

Do u have any solution for this conditions?

  • we have 2 kinds of users
  • we have 2 products with non-content price (price change randomly)
  • we don't want to know users address and also users don't know about or wallet balance too
  • I just want to user click on payment button and pay, nothing more! And then I check the payment status

What is the best idea for :

user select a product and see price, click on payment button and pay the price (that not constant and change each day), so how can figure out that user paid it and complete the order?

Is there any way such as Bitcoin to generate new payment addresses for each click (and save it in my DB and check transaction)?

Or any idea? (if u suggest smart contract, please right full code of the contract)

Edit 1 :

Also I prefer users each time see a new payment address for each product, it's so easy to trace

1

If you don't want to know a user's address and/or users to know about wallet balance, that implies you can't use eth.

Almost sounds like you don't want to use the Ethereum blockchain, perhaps for your use case a different technology is most suitable.

For example https://blockstack.org.

Alternatively, if you are dead set on using Ethereum considering creating a mechanism to pay the gas costs for your users https://medium.com/zastrin/how-to-save-your-ethereum-dapp-users-from-paying-gas-for-transactions-abd72f15e14d, but they still need a way to connect to ethereum. And only store purchase information on the blockchain, user X bought Item Y, while the actually transactions occur with credit cards or debit cards.

0

You want to build a shopping website where people can pay using Ether. No problem.

Firstly you should read the yellow paper. This explains the structure of an Ethereum address and an Ethereum transaction.

Then depending on which programming language you want to use to build your product you need to generate an Ethereum address. This can be achieved in Javascript using the various ethererum-js libraries.

Then you tell your user to send the appropriate amount of Ether to that address.

Then you have a backend service or equivalent which polls an Ethereum node to verify that the funds have been received to that address. One important thing to note here would be to make sure that an appropriate number of blocks have been mined after the one containing the payment transaction such that you can verify that no chain reorganisation has occurred.

You’d also want to control and manage your own nodes to prevent any nefarious middle man from manipulating your payment process.

For what you are asking you do not need a smart contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.