Reputation: 789
I want to automate BITCOIN payments and i need to make a donate button that sends an aditionally OP_RETURN parameter with the value of the encrypted order id. I just want to send a small message with the payment. I have documented myself a little bit and i saw that OP_RETURN parameter may help me.
OP_RETURN : http://bitzuma.com/posts/op-return-and-the-future-of-bitcoin/
How do i make that happen? Is there a wallet that does that? Or I have to do it from bitcoin-cli
?
I also want to make this in PHP
and here is an example that i don't understand :
https://github.com/coinspark/php-OP_RETURN
I mean i need a button that will make a payment with that encrypted order id.
Thanks in advice.
Upvotes: 2
Views: 808
Reputation: 976
You will want to do that server side via encrypted and authenticated client using BIP 70 - AKA The Bitcoin Payment Protocol.
You can create a browser side client to do as you described but you do not want to trust the data the client sends along without verification and you checking the transaction before it is sent to the network will not make you trustworthy as a merchant but rather a MIM between the user and the blockchain.
For more information on BIP 70 The Payments Protocol See: https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki
Upvotes: 1