• I’m getting the following error after tying in my Master key. I’ve verified it’s correct several times.

    Error:
    Bitcoin payment gateway is not operational: Electrum Master Public Key is invalid. Must be 128 characters long, consisting of digits and letters: ‘a b c d e f’

Viewing 11 replies - 1 through 11 (of 11 total)
  • I am having the same issue. What I discovered is the key that electrum provided is only 111 characters long. Which means the problem is with electrum not producing the correct length or Woocommerce is looking for the wrong length. Either way I hope this gets fixed soon because it has my whole site stopped dead in its tracks.

    BobsBURGS

    (@bobbysburgers)

    Agreed no dice here.

    What version of electrum r u using?

    I believe only the old v1.9.8 will work with its mpk format.

    The new elec v2 mpk that starts with ‘xpub’ doesnt work with the woo plugin. But the old v1.9.8 electrum mpk plugs in just fine..

    I use electrum-2.0.3-setup and I get some problem with you ?
    can you tell where I can download v1.9.8 ?

    You can download v1.9.8 here https://download.electrum.org/
    But it don’t run, even in capabitily mode.

    there’s a post regarding the master key length bug here
    https://bitcointalk.org/index.php?topic=1026571.0

    I’ve bookmarked it and will post an update here if anyone finds a solution

    potential solution for those using v2+ with the new 111 character master keys, someone please verify

    open the file bwwc-bitcoin-gateway.php

    find line
    else if (!preg_match ('/^[a-f0-9]{128}$/', $this->electrum_master_public_key))

    replace with
    else if (!preg_match ('/^[0-9a-zA-Z]{111}$/', $this->electrum_master_public_key))

    open file bcmath_Utils.php

    find
    define('MAX_BASE', 128);

    replace with
    define('MAX_BASE', 111);

    neosin, Your solution worked perfectly for me. Thanks!

    potential solution for those using v2+ with the new 111 character master keys, someone please verify

    open the file bwwc-bitcoin-gateway.php

    find line
    else if (!preg_match (‘/^[a-f0-9]{128}$/’, $this->electrum_master_public_key))

    replace with
    else if (!preg_match (‘/^[0-9a-zA-Z]{111}$/’, $this->electrum_master_public_key))

    open file bcmath_Utils.php

    find
    define(‘MAX_BASE’, 128);

    replace with
    define(‘MAX_BASE’, 111);

    Paths to the files:
    wp-content > plugins >bitcoin-payments-for-woocommerce >bwwc-bitcoin-gateway.php

    wp-content > plugins >bitcoin-payments-for-woocommerce >phpecc > classes >util > bcmath_Utils.php

    The above code let me use the key, but now I’m getting an error upon checkout. When I check Bitcoin as my payment, and click Place Order, the order does not go through and I get the following error at the top of the checkout page:

    “CurveCurveFp Object ( [a:protected] => 0 [b:protected] => 7 [prime:protected] => 115792089237316195423570985008687907853269984665640564039457584007908834671663 ) does not contain point ( 20139727203196486522876591193063649819462947761513549103823800141681658369 , 369049320460203173903206256216019890340108033867982827520 )”

    I don’t know if this error is related to the code changes (above) or if it is something different.

    Here is the URL: https://www.goldextradellc.com/checkout/

    Any help / suggestions you can give me would be great. Thanks

    Hi,

    In my test installation, after aplying @neosin’s fix, I get that too. (With the first long number matching exactly @571Design’s error msg. The sesond one matches partially, and the 3rd one not at all).

    I’m running everything freshly downloaded, so:
    – WP 4.2.2
    – Woo-commerce 2.3.9
    – Bitcoin Payments for WooCommerce 3.12
    – Electrum 2.2

    Is anybody getting a syntax token error? Says something like error paraing line 1 column 1 of json when clicking checkout,

    I had this plugin working again but latest wordpress/woo update must have conflicted somehow.. Anybody have any advive?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Invalid Electrum Key’ is closed to new replies.