Skip to content

Commit

Permalink
fix jsonrpc curl
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdsa committed May 10, 2020
1 parent 29fc6ab commit a3dfd67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions merchant.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ How to accept Bitcoin on a website using Electrum
=================================================

This tutorial will show you how to accept Bitcoin on a website with SSL signed
payment requests, according to BIP-70_. The docs are updated for Electrum 3.1.2.
payment requests, according to BIP-70_. The docs are updated for Electrum 4.0.

.. _BIP-70:
https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki
Expand Down Expand Up @@ -221,16 +221,16 @@ we can perform queries using curl or PHP. Example:

.. code-block:: bash
curl --data-binary '{"id":"curltext","method":"getbalance","params":[]}' http://username:password@127.0.0.1:7777
curl --data-binary '{"jsonrpc":"2.0","id":"curltext","method":"getbalance","params":[]}' http://username:password@127.0.0.1:7777
Query with named parameters:

.. code-block:: bash
curl --data-binary '{"id":"curltext","method":"listaddresses","params":{"funded":true}}' http://username:password@127.0.0.1:7777
curl --data-binary '{"jsonrpc":"2.0","id":"curltext","method":"listaddresses","params":{"funded":true}}' http://username:password@127.0.0.1:7777
Create a payment request:

.. code-block:: bash
curl --data-binary '{"id":"curltext","method":"addrequest","params":{"amount":"3.14","memo":"test"}}' http://username:password@127.0.0.1:7777
curl --data-binary '{"jsonrpc":"2.0","id":"curltext","method":"addrequest","params":{"amount":"3.14","memo":"test"}}' http://username:password@127.0.0.1:7777

0 comments on commit a3dfd67

Please sign in to comment.