Giter Site home page Giter Site logo

Comments (8)

ser avatar ser commented on May 23, 2024
  1. I think you should read electrum docs first, including merchant chapter.
  2. We are planning to deliver other templates, but until they are ready, look at javscript part of index.html and just add address in there.

from electrum-docs.

WhiteBookmark avatar WhiteBookmark commented on May 23, 2024

I have read it again and so far everything works fine except for the web socket part, which I don't understand what to do, there is not enough information on how to successfully implement the websockets. JSONRPC is working fine with curl, but I need a way to know whether or not the user has paid the invoice which can be done using sockets only.

from electrum-docs.

ser avatar ser commented on May 23, 2024

Maybe this guide will be helpful, then? http://yz.mit.edu/wp/web-sockets-tutorial-with-simple-python-server/

from electrum-docs.

WhiteBookmark avatar WhiteBookmark commented on May 23, 2024

Well that just shows hosting a simple socket server. You mean I just need to run an empty web socket server with nothing coded inside it and electrum will take care of everything by itself ?

from electrum-docs.

ser avatar ser commented on May 23, 2024

If you followed electrum merchant docs, the simple socket server already works for you. The tutorial is useful to see how the javascript part is constructed.

from electrum-docs.

WhiteBookmark avatar WhiteBookmark commented on May 23, 2024

I am not sure if it is actually working or I am not doing something right. I see this message in browser console when I test a payment request:

JQMIGRATE: Migrate is installed, version 3.0.1
index.html?id=5835f9a531:41 getJSON:success
index.html?id=5835f9a531:76 Opening WSS: wss://Server IP Address:7246/
index.html?id=5835f9a531:77
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://Redirected Url Here/index.html with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
WebSocket connection to 'wss://Server IP Address:7246/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
(anonymous) @ index.html?id=5835f9a531:77

I also noticed that it is using "wss", I did not configure https, perhaps this could be the issue ? But why is it automatically using wss (https) model, I don't need it, is there any way to let it use ws instead of wss ?

from electrum-docs.

ser avatar ser commented on May 23, 2024

You can't use electrum merchant without providing keys for SSL. It is clearly stated in requirements on the top of documentation chapter.

from electrum-docs.

ecdsa avatar ecdsa commented on May 23, 2024

merchant documentation was updated for 4.0
websockets do not require an installation anymore

from electrum-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.