I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

alexg

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 2,194 total)
  • Author
    Posts
  • in reply to: php_curl error code 23 on site logs #13630
    alexg
    Keymaster

    Great to hear that you resolved the curl issue.

    This is not an error, it’s just a notice, informing you that upon plugin activation your admin user was given the manage_wallets capability:

    https://github.com/dashed-slug/wallets/blob/6.2.5/admin/capabilities.php#L310

    You should be good to go. Please let me know in a new thread if you have any more questions about the plugin.

    with regards

    in reply to: php_curl error code 23 on site logs #13622
    alexg
    Keymaster

    Hello,

    This error comes from the php_curl module. The module writes retrieved data from the web to a temporary file.

    Here the plugin is simply querying Coingecko for some exchange rates. Since in this case the data is very small in size, this should not normally be a problem.

    1. Check to see if the disk space on your web server is completely full. Only if the free space is 0 bytes this problem would arise. This could happen for example if you have left some logs running without logrotate.

    2. Check to see that the wordpress directory and its subdirectories are writeable by the webserver (apache or nginx).

    Depending on your system, you may need to do:

    chown -R www-data:www-data /path/to/wordpress

    But don’t just copy the command, check to see what the uid and gid should be, and check your system first. If you are not sure, take a full backup of your site first. This command can mess things up if you don’t know what you are doing.

    In any one of these two cases, it is a misconfiguration of your web server. It is likely that this causes problems to more plugins than just this one. If someone else is administering your host for you, contact them about this.

    Hope this helps.

    Please let me know if you have any more questions.

    with regards

    alexg
    Keymaster

    Hello,

    The error you mentioned is unavoidable. It’s simply the plugin checking whether there needs to be a migration from the old custom SQL tables that existed in versions before 6.0.0. Nothing to worry about.

    If you enable verbose logging in the settings, you will get more detail in the wordpress debug log on how the transactions are executed.

    The available balance does not count pending transactions, while the normal user balance does.

    Transactions, including deposits and withdrawals should be initiated in a pending state by your code, then they should either transition into a done or to a fail state by the wallet adapter. Does your transaction remain in a pending state?

    I am not sure what the problem you describe is. Can you please provide screenshots of the currency page and of the transaction page screens? You can either post them here or email me, whichever you prefer.

    Looking forward to your reply.

    with regards

    alexg
    Keymaster

    Hello,

    The code you provided does not work because you are creating a class Wallets that does not exist. There is a DSWallets\Wallet class that contains an adapter object of DSWallets\Wallet_Adapter class. The wallet adapter is an object that holds the connection information to the wallet as well as the code to communicate with the wallet. You can call get_new_address on the wallet adapter to get a new address.

    Once you have a $currency object, here’s how to generate a new address:

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    (It’s necessary to pass the currency into the method because there are wallets with multiple currencies e.g. CoinPayments wallet)

    It’s best to wrap this in a try..catch, because if there is any problem with communication with the wallet, this can throw.

    So, to put it all together:

    try {

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    } catch ( \Exception $e ) {
    error_log( “Could not generate a new address for $currency because: ” . $e.getMessage() );
    }

    In general, the UIs that require JavaScript, communicate with the plugin via its RESTful API, which is here and documented here.

    If you check out the code for the various API endpoints, you can see example code for the basic operations.

    Hope this helps.

    Please let me know if you have any more questions. I want to answer all of them and help you with your project.

    with regards

    alexg
    Keymaster

    Hello,

    You can use the functions in helpers/balances.php to get the balances.

    PHPdocumentor page:

    https://wallets-phpdoc.dashed-slug.net/wallets/files/build-helpers-balances.html

    Note that these functions are all under the DSWallets namespace. So you either need to be in that namespace, or prefix the functions with the namespace. e.g. $balances = DSWallets\get_all_balances_assoc_for_user( $user_id );

    You can see this particular function in action at the plugin’s user profile page code:

    https://github.com/dashed-slug/wallets/blob/6.2.4/admin/profile.php#L97-L216

    To be clear, this is the code that displays user balances in the user profile admin screen.

    Note the difference between balances and available_balances. The links point to the glossary.

    Please let me know if you have any more questions about anything.

    with regards

    alexg
    Keymaster

    Hello,

    Unfortunately there are no UIs currently that do not require JavaScript.

    I understand the need to avoid JavaScript in cases where tor must be used.

    If you can create your own forms and PHP handlers, then it’s very straightforward to interact with the plugin from PHP using the PHP API. Please see the following link for details and sample code on how to create transactions:

    https://wallets-phpdoc.dashed-slug.net/wallets/classes/DSWallets-Transaction.html

    For example, initiating a withdrawal would require you to create a new withdrawal transaction, and save it on the DB.

    There are also other ways to communicate with the plugin, but I think this is the one that’s relevant to your use case.

    I remain available to answer any questions you may have about this.

    Hope this helps.

    with regards

    in reply to: Im getting Error trying to download 2.0 #13575
    alexg
    Keymaster

    Oops! My apologies! Download is now fixed.

    If you encounter any difficulties using the adapter, please let me know in a new thread or by email.

    with regards

    in reply to: BTC Pay Server #13559
    alexg
    Keymaster

    Hello,

    While this is a good idea, I have not developed any BTCPay wallet adapter, and it’s not possible for me to develop one at this time.

    If you are interested in developing a wallet adapter yourself, or if you plan to hire a developer, I have provided information here:

    https://github.com/dashed-slug/wallets/blob/6.2.4/docs/developer.md#developing-wallet-adapters-wallet-adapters

    Sample code (stubs) are here: https://github.com/dashed-slug/my-wallet-adapter

    I am always available to answer any questions about this.

    with regards

    alexg
    Keymaster

    Hello,

    This is certainly not normal behavior. I am attaching a screenshot of what you should be seeing in this case.

    Before completing your order, you get a dropdown, showing you how much you would pay in each available cryptocurrency. This is calculated using the exchange rates on the system.

    Can you please email me a screenshot of that dropdown?

    Also, can you please check if the exchange rates on the currencies that you made available are set correctly? You can do this in the admin screen for each currency.

    Normally the exchange rates are kept up to date with data from CoinGecko. This is only done if you have set correctly the CoinGecko ID on each currency, and if the cron jobs are running.

    Looking forward to your reply.

    with regards,
    Alex

    Attachments:
    You must be logged in to view attached files.
    in reply to: E-Mail notifications #13305
    alexg
    Keymaster

    For the record, this has now been implemented in version 2.3.1. Sorry for the long delay. 😊

    in reply to: Order Placed/Filled Notification. #13304
    alexg
    Keymaster

    For the record, this has now been implemented in version 2.3.1. Sorry for the long delay. 😊

    in reply to: Bitcoin core Wallet Adapter installation #13301
    alexg
    Keymaster

    Even if you have disabled your firewall, the hosting provider has their own firewall to protect their systems. You must contact them and ask them to add a specific exception for incoming TCP ports to your RPC port on your host’s IP.

    Bottom line, the plugin must be able to contact the wallet. No other way around it.

    in reply to: Bitcoin core Wallet Adapter installation #13295
    alexg
    Keymaster

    Hello,

    1. Ensure that rpcallowip is set to the IP of your WordPress installation in CIDR notation.
    2. Ensure that rpcbind is set to the public-facing IP of your wallet node. This tells the wallet to listen on the correct NIC.
    3. If your wallet node is on a hosting provider, contact your hosting provider, and ask them to open their firewall for your server and for incoming TCP connections to your RCP port.

    Hope this helps. Please let me know if you continue to face problems.

    with regards

    in reply to: Bitcoin core Wallet Adapter installation #13291
    alexg
    Keymaster

    If you are using a strong password with rpcpassword, does it contain the equals (=) character?

    If so, you would be getting this problem. The equals character is used to assign values in the config file, and it can’t be used as part of the password.

    in reply to: Bitcoin core Wallet Adapter installation #13289
    alexg
    Keymaster

    Hello,

    HTTP_UNAUTHORIZED simply means that you have not entered the username/password correctly.

    Make sure that you understand the difference between using rpcuser/rpcpassword and rpcauth.

    You should use either user/pass or auth.

    (The values foo and bar I gave above are examples, you should replace them with the credentials you are planning to use.)

    Hope this helps. Please let me know if you have any more questions.

    with regards

Viewing 15 posts - 1 through 15 (of 2,194 total)