Giter Club home page Giter Club logo

electrum-merchant's People

Contributors

ecdsa avatar ser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electrum-merchant's Issues

Index.html function getUrlParameter(sParam) missing opening <script> tag

I fought this for days thinking I had configurations. I finally figured last night that in the Simple/index.html
it is missing the script declaration prior to the function. the Function does have the </script> tag.
i tested it with the basic tag<script type="text/javascript"> and it appears to have at least resolved the basic compiling error I was receiving.

<!DOCTYPE HTML>
 <html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      < title>Payment request</title>
         <script type="text/javascript" charset="utf-8"
        src="static/jquery/package/dist/jquery.js">
    </script>
    <script type="text/javascript"
        src="static/jquery-migrate-3.0.1.js">
    </script>
    <script type="text/javascript"
        src="static/jquery-ui.min.js">
    </script>
    <script type="text/javascript"
        src="static/qrcodejs/package/qrcode.js">
    </script>
    <link rel="stylesheet" type="text/css"
        href="static/jquery-ui-themes-1.12.1/themes/smoothness/jquery-ui.min.css">

function getUrlParameter(sParam)
 {

RuntimeWarning: coroutine 'ClientSession.close' was never awaited

Merchant keeps crashing on a Debian 9 server. I have correctly configured everything. I also tried several different versions of python3, but this keeps happening:

python3.6 -m electrum-merchant
[2019-06-01 01:43:15,579] [INFO] Downloading and installing files into request directory
[2019-06-01 01:43:15,580] [INFO] copying index.html from flavour simple
[2019-06-01 01:43:15,582] [INFO] Downloading jquery
[2019-06-01 01:43:15,583] [DEBUG] GET https://registry.npmjs.org/jquery/latest
[2019-06-01 01:43:16,531] [INFO] Downloaded [email protected]
/usr/local/lib/python3.6/site-packages/npmdownloader/npmclient.py:19: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
  self._session.close()
E | asyncio | Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f2b700eff60>
E | asyncio | Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f2b6fd52108>, 88701.397910736)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f2b700effd0>
[2019-06-01 01:43:16,577] [INFO] Downloading qrcodejs
[2019-06-01 01:43:16,577] [DEBUG] GET https://registry.npmjs.org/qrcodejs/latest
[2019-06-01 01:43:17,471] [INFO] Downloaded [email protected]
[2019-06-01 01:43:19,030] [INFO] Processing: /var/www/html/payment/static/jquery/jquery-3.4.1.tgz into /var/www/html/payment/static/jquery
[2019-06-01 01:43:19,665] [INFO] Deleting /var/www/html/payment/static/jquery/jquery-3.4.1.tgz
[2019-06-01 01:43:29,065] [INFO] Processing: /var/www/html/payment/static/qrcodejs/qrcodejs-1.0.0.tgz into /var/www/html/payment/static/qrcodejs
[2019-06-01 01:43:29,075] [INFO] Deleting /var/www/html/payment/static/qrcodejs/qrcodejs-1.0.0.tgz
[2019-06-01 01:43:38,286] [INFO] Downloaded Jquery-UI.
[2019-06-01 01:43:38,418] [INFO] Downloaded Jquery-UI 3.x fix.
[2019-06-01 01:43:40,590] [INFO] Downloaded Jquery-UI themes.
[2019-06-01 01:43:40,591] [INFO] Finished.
E | asyncio | Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f2b6fd2b7b8>
E | asyncio | Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f2b6fd52588>, 88702.341378563)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f2b6fd2b748>

View balance via browser

Can someone assist with my php page?

Trying to list addresses via browser.
php

But page is just showing up blank. I'm quite new to PHP, so how can I troubleshoot this best?

I can run curl from CLI on electrum-merchant server and it shows list of address (top left window.) bottom left is my blank web page.

Port 7777 is open.

This is my php page.

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:7777");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST , 1);
curl_setopt($ch, CURLOPT_USERPWD , 'web:uh2HgQyuq2d4owersMgeec2j8t6yWMU7JstmPE86PZGisw2YLj');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"id\":\"curltext\",\"method\":\"listaddresses\",\"params\":[]}");

$result = curl_exec($ch);

dd(json_decode($result,1));

?>

Thanks in adavance,
Samuel.

prevent forcing download payment page because of Content-Type octet-stream

Hello

When I add a request I get this Headers

Content-Type: application/octet-stream
Etag: "16b8a68361b388c1-13ad"
Last-Modified: Thu, 18 Nov 2021 13:19:08 GMT
Content-Length: 5037
Accept-Ranges: bytes
Date: Sat, 20 Nov 2021 13:05:08 GMT
Server: Python/3.6 aiohttp/3.8.1

I think the Content-Type octet-stream forces the download of the page and not showing the payment page.

Any Idea how to fix this? I think it should be possible with application/bitcoin-paymentrequest. But I don't know where to change this.

best regards

electrum add request error

On executing this command electrum addrequest 3.14 -m "this is a test" instead of json it throws some error

I'm implementing electrum (v3.3.8) for the first time, if i'm missing something

Traceback (most recent call last):
File "/root/.local/lib/python3.6/site-packages/electrum/pem.py", line 38, in a2b_base64
b = bytearray(binascii.a2b_base64(s))
binascii.Error: Incorrect padding

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/electrum", line 426, in
result = run_offline_command(config, config_options, plugins)
File "/usr/local/bin/electrum", line 259, in run_offline_command
result = func(*args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/electrum/commands.py", line 96, in func_wrapper
return func(*args, **kwargs)
File "/root/.local/lib/python3.6/site-packages/electrum/commands.py", line 668, in addrequest
self.wallet.add_payment_request(req, self.config)
File "/root/.local/lib/python3.6/site-packages/electrum/wallet.py", line 1272, in add_payment_request
pr = paymentrequest.make_request(config, req)
File "/root/.local/lib/python3.6/site-packages/electrum/paymentrequest.py", line 479, in make_request
sign_request_with_x509(pr, key_path, cert_path)
File "/root/.local/lib/python3.6/site-packages/electrum/paymentrequest.py", line 448, in sign_request_with_x509
params = pem.parse_private_key(f.read())
File "/root/.local/lib/python3.6/site-packages/electrum/pem.py", line 141, in parse_private_key
bytes = dePem(s, "PRIVATE KEY")
File "/root/.local/lib/python3.6/site-packages/electrum/pem.py", line 71, in dePem
retBytes = a2b_base64(s) # May raise SyntaxError
File "/root/.local/lib/python3.6/site-packages/electrum/pem.py", line 40, in a2b_base64
raise SyntaxError("base64 error: %s" % e)
SyntaxError: base64 error: Incorrect padding

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.