Forum Replies Created
-
AuthorPosts
-
alexg
KeymasterHello,
In the latest version
2.3.0
, any commissions that have been paid out are listed as “paid” and additionally there is a “withdrawal” row displayed. This is simply a withdrawal of the commission to the user’s wallet. The actual withdrawal to an external blockchain address can be performed in the usual way (via[wallets_withdraw]
).It is no longer advisable to have the following payment option enabled: “Withdrawal Request – Vendors can request for commission withdrawal.” If a vendor were to request a withdrawal, the withdrawal row will not be recorded. Instead, it’s best if only the admin can mark a commission as “paid”. The plugin will warn the admin that they should disable withdrawal requests.
with regards
alexg
KeymasterHello,
The latest version
2.3.0
addresses this issue in the following way:If a cart has been paid using cryptocurrencies with this plugin, then the vendor receives their commission in that same currency.
If the cart payment has been performed via any other gateway, then the amount transferred from the admin to the vendor is denominated in a currency that the admin has chosen to be a site-wide default. The conversion is done with the exchange rate that is valid at the date of the commission payment.
If the admin has not yet selected a site-wide default currency for commission payouts, then they will see a warning about this.
Regarding your other question, if you want to specify directly an exchange rate between the shop’s woocommerce currency and some custom points, use the existing code example to do so: https://gist.github.com/alex-georgiou/492196184f206002c864225180ca8fbb
with regards
alexg
KeymasterHello,
I have been able to develop a solution for this.
I believe the best approach is to pay out crypto commissions in the currency that the cart was paid. If this is possible because the cart was not paid with a cryptocurrency, then the plugin converts the value to a default currency that the admin has selected. The commissions will then be paid out in that cryptocurrency.
(At first I thought it would be a good idea to let each vendor choose their preferred cryptocurrency, but this is technically a lot harder, because the Marketplace code does not make this easy to extend. Also, if you let each vendor choose their preferred currency for payments, then you need to maintain significant balances on each of the coins they select. Instead, if vendors get paid in one cryptocurrency then you only need to keep some funds in that currency.)
The patch will be out once I have a solution for the missing withdrawal row in the Banking Overview.
I will post again here when the patch is out.
with regards
alexg
KeymasterOK, this is clear now.
When the receives a commission, this is recorded in the Banking Overview table as a row of type “commission”, but when the vendor requests a withdrawal, there is no row of type “withdrawal”, when using the crypto payment gateway. I should be able to fix this soon.
with regards
alexg
KeymasterHello,
Yes, you should set the
walletnotify
argument in your full node wallet to call this notification URL. This way, every time the wallet sees a new transaction, or a new confirmation for an existing transaction, it will tell the plugin to check that transaction. This is in the instructions you see at first when you still haven’t set up the coin adapter correctly.To use curl in your notification mechanism, you’d add something like the following in your wallet’s
.conf
file:walletnotify=curl -sk https://www.urcryptodepot.com/wallets/api3/notify/FCK/wallet/%s >/dev/null blocknotify=curl -sk https://www.urcryptodepot.com/wallets/api3/notify/FCK/block/%s >/dev/null alertnotify= curl -sk https://www.urcryptodepot.com/wallets/api3/notify/FCK/alert/%s >/dev/null
Restart your wallet after adding the above settings.
Also, don’t forget to increase the number of confirmations again.
Finally, don’t forget to re-enable transients. Disabling that debug setting will impact performance by a lot.
with regards
alexg
KeymasterHello,
I have now tested WC-Marketplace version
3.4.6
, and it seems that the issues we observed previously are fixed:It is no longer possible to generate two transactions for one commission. Currently, if the admin sets the commission as “paid”, the effect is the same as the vendor requesting a withdrawal. Either one action prevents the other. This was not the case with previous versions.
I am proceeding to review your other request regarding paying out crypto commissions to vendors, for orders where the end customer has used a different payment gateway.
If you think that there is something still pending from this thread (withdrawals), please let me know.
with regards
alexg
KeymasterThanks for the kind words. Yes, I will keep it up!
alexg
KeymasterHello,
You can disable the max height on the markets view with the following CSS:
.dashed-slug-wallets-exchange.market table { max-height: none; }
Or if you want to set some particular height:
.dashed-slug-wallets-exchange.market table { max-height: 100em; }
with regards
alexg
KeymasterHello,
Short answer: yes!
Generally speaking you can run WordPress as a tor hidden site, but it’s tricky. WordPress normally contacts various APIs, including the wordpress.org update server; these communications can de-anonymize you. There are several articles online that talk about how to run WordPress as an onion hidden site.
Besides your full node wallets, the plugin also contacts some third-party APIs for the purpose of retrieving exchange rates (See the menu “Wallets” -> “Exchange rates”). If you’re using even one of these, you can be de-anonymized. In the admin page for exchange rates, you can specify a tor endpoint to use when contacting these services.
If you decide to use full node wallets, then any contact with those wallets is probably safe because presumably the wallets are on servers that you control. If you choose to use the CoinPayments adapter, then this can also be configured to use tor (but you need to trust the coinpayments platform with your anonymity). The settings for enabling tor for the coin adapter are under “Wallets” -> “CoinPayments” -> “HTTP Settings”.
If you are strongly interested in preserving your anonymity you might be interested to set up a Monero full node on your own server, and use the Monero coin adapter, rather than rely on a third party service.
In general there’s always trade-offs between anonymity and ease of use. Setting up a Monero full node is somewhat harder but all the necessary instructions are available on the coin adapter’s homepage, and I am available to answer any questions you may have.
EDIT: I noticed now that you’ve posted under the forum for the Exchange extension, while I responded with general information for how to run the plugin in a hidden site. There are no additional considerations for running the Exchange in a hidden site. To answer your specific question, you can use either the static or dynamic templates. The exchange does not contact any third party APIs on its own. My recommendation is that you observe your server with wireshark and see if your identity is being leaked anywhere. Any plugin that you run can potentially de-anonymize you (but the Exchange extension is not one of them), so think in general what APIs your server contacts.
with regards
December 4, 2019 at 9:11 am in reply to: I keep getting an error when short code tries to load #7406alexg
KeymasterHello,
This is because the JSON API responds with HTML rather than JSON. You are probably seeing some error.
What do you see in your browser when you navigate to https://www.example.com/?__wallets_apiversion=3&__wallets_action=get_coins_info ? (replace “www.example.com” with your domain name).
In production you should disable errors from being displayed in the frontend. Do this with
define( 'WP_DEBUG_DISPLAY', false );
in yourwp-config.php
.Additionally, it’s possible that some caching plugin is caching the JSON responses. See if disabling the caching plugin makes a difference. If it does, re-enable the plugin and white-list any urls with the
__wallets_action
GET parameter.If disabling caching plugins does not make a difference, there should be some type of error in your WordPress debug log, since you mentioned that the cron job displays an incomplete page. Instructions for enabling debugging are here: https://wordpress.org/support/article/debugging-in-wordpress/
Hope this helps. Let me know what errors you see.
with regards
alexg
KeymasterHello,
Unfortunately I have no experience with BTCPay server.
From a quick look at the docs, it does not seem that the API it exposes is the standard RPC API, instead it is a different API altogether: https://docs.btcpayserver.org/integrations/customintegration
So it seems unlikely that you will be able to connect with the available coin adapters. (Although I’m not 100% sure, I could be missing something here.)
Moreover, it would not be easy to develop a new coin adapter for it, because in this model, the client application (WordPress in this case) should be holding the private keys, not the BTCPay server. It might still be doable, I guess the coin adapter itself can hold the keys, but it’s a very different architecture from what we had before.
The good news is that since you already have the pi, if you have enough storage on it, you could simply install a (pruned) bitcoin core node on it, and this will definitely work with the built-in Bitcoin core coin adapter. Just remember to refresh the user deposit addresses after you connect to your new wallet.
Please let me know if you have any questions about this.
P.S. Were you unable to complete KYC verification? If you can get verified, then CoinPayments should still work. If for some reason you cannot get verified, then I guess it’s time to switch to a full node!
with regards
alexg
KeymasterHello,
First of all, if you have sent funds to an address generated from your wallet backend, the funds will be in that wallet, even if the plugin does not show this.
I have never come across the particular issue you describe. You say that after installing the plugin, and even before activating it, you see error 504 Gateway Timeout.
Normally timeout errors can occur when the plugin attempts to contact the RPC API of a full node wallet, such as Bitcoin core, but there is a firewall in between, blocking communication. However, since as you say, the plugin is not active, a firewall cannot be the problem. Please tell me the following:
1. Can you confirm again, that after installing (not activating) the plugin, your site stops, and after you remove the plugin files the site works again? I am asking you to check again because this is very unusual. Recent versions of WordPress can recover even from a plugin that crashes, by deactivating the plugin.
2. While the plugin was still working, which coin adapters were you using?
3. Was the built in Bitcoin core node adapter enabled or disabled?
4. Which version of PHP are you running?
5. Can you check the PHP error log on your server? There will be more information there about your problem and what causes it.
Looking forward to your reply.
with regardsalexg
KeymasterHello,
In the latest patch
4.4.6
it is now possible to sort by user balances. When you do, the rows are also sorted by coin, so you can compare balances per coin.(I was not able to make the last column “available balance” sortable at this time, because that would be much harder for technical reasons.)
with regards
alexg
KeymasterHello,
The latest version
4.4.6
addresses this issue. Hopefully the behavior of the plugin is a little more helpful now in these situations. Please see the relevant release notes on the blog: https://www.dashed-slug.net/hot-wallet-low-balance/with regards
alexg
KeymasterHello,
Are you certain that the litecoin daemon you’re running is the one that generated the deposit address? If you have switched from another wallet backend, you should first renew the deposit addresses as mentioned in the faq.
1. First, check with your wallet’s cli to see if the transaction got through and if the deposit address belongs to this wallet. (Use the commands
litecoin-cli listaddressgroupings
andlitecoin-cli listtransactions
to check) If the deposit address was generated from another wallet, then the funds will have gone to that other wallet.2. Additionally, it is possible that the plugin is not notified of the deposit. Check to make sure that walletnotify is set up correctly in your litecoin.conf and that the curl command goes through to the WordPress site.
3. It is possible that the balance is not updating if the cron job is not running. To test this, go to cron job settings, click on the cron job trigger link, and refresh this link a few times. If this was the problem, the deposit will go through. In that case, you need to set up some mechanism that triggers this url periodically, because the wp_cron mechanism is not working on your installation.
4. Also check with
litecoin-cli getiblockchainnfo
to see if your wallet is fully synced. The current block height for Litecoin is 1743521 so if yourblocks
value is much lower, your wallet has not yet seen the transaction.Please let me know if you need any help/advice on how to check these four things, or if you have any more questions.
with regards
-
AuthorPosts